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

Unified Diff: rietveld.py

Issue 6825085: Add script to apply a patch from rietveld. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 8 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
« apply_issue.py ('K') | « patch.py ('k') | tests/patch_test.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 98422d64675abd7469534a2a61a394a701ce0d8a..0bcb19f4a88e1d3968bc6b5fa0f334feaefc01b4 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -112,10 +112,11 @@ class Rietveld(object):
props = self.get_patchset_properties(issue, patchset) or {}
out = []
for filename, state in props.get('files', {}).iteritems():
+ logging.debug('%s' % filename)
status = state.get('status')
if status is None:
raise patch.UnsupportedPatchFormat(
- filename, 'File\'s status is None, patchset upload is incomplete')
+ filename, 'File\'s status is None, patchset upload is incomplete.')
# TODO(maruel): That's bad, it confuses property change.
status = status.strip()
@@ -137,7 +138,8 @@ class Rietveld(object):
if state['num_chunks']:
diff = self.get_file_diff(issue, patchset, state['id'])
else:
- diff = None
+ raise patch.UnsupportedPatchFormat(
+ filename, 'File doesn\'t have a diff.')
out.append(patch.FilePatchDiff(filename, diff, props))
else:
# Line too long (N/80)
@@ -188,6 +190,7 @@ class Rietveld(object):
maxtries = 5
for retry in xrange(maxtries):
try:
+ logging.debug('%s' % request_path)
result = self.rpc_server.Send(request_path, **kwargs)
# Sometimes GAE returns a HTTP 200 but with HTTP 500 as the content. How
# nice.
« apply_issue.py ('K') | « patch.py ('k') | tests/patch_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698