Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Unified Diff: rietveld.py

Issue 1149653002: [depot_tools] Find, upload and apply patchset dependencies (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Upload dependencies even if closed Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« git_cl.py ('K') | « git_cl.py ('k') | third_party/upload.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: rietveld.py
diff --git a/rietveld.py b/rietveld.py
index 0114cfe0ccee6bf9922c03f9c8575191484ef06b..e76f48624215f3709ea49240193dab9011a51dbd 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -84,6 +84,18 @@ class Rietveld(object):
data['description'] = '\n'.join(data['description'].strip().splitlines())
return data
+ def get_depends_on_patchset(self, issue, patchset):
+ """Returns the patchset this patchset depends on if it exists."""
+ url = '/%d/patchset/%d/get_depends_on_patchset' % (issue, patchset)
+ resp = None
+ try:
+ resp = self.get(url)
+ except urllib2.HTTPError, e:
+ # The get_depends_on_patchset endpoint does not exist on this Rietveld
agable 2015/06/08 20:05:53 Add a TODO to make this a real error eventually?
rmistry 2015/06/09 16:16:45 Done.
+ # instance yet. Ignore the error and proceed.
+ pass
+ return resp
+
def get_patchset_properties(self, issue, patchset):
"""Returns the patchset properties."""
url = '/api/%d/%d' % (issue, patchset)
@@ -675,6 +687,9 @@ class ReadOnlyRietveld(object):
def get_patchset_properties(self, issue, patchset):
return self._rietveld.get_patchset_properties(issue, patchset)
+ def get_depends_on_patchset(self, issue, patchset):
+ return self._rietveld.get_depends_on_patchset(issue, patchset)
+
def get_patch(self, issue, patchset):
return self._rietveld.get_patch(issue, patchset)
« git_cl.py ('K') | « git_cl.py ('k') | third_party/upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698