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

Unified Diff: rietveld.py

Issue 6874006: Add support for A+ files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: . Created 9 years, 3 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
« no previous file with comments | « 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 2320f3d2b974c31840c3ac3899443dfeea7d957b..6f4f4ae7fd864e07355c572dd79011157a7bda92 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -155,10 +155,14 @@ class Rietveld(object):
# Support this use case if it ever happen.
raise patch.UnsupportedPatchFormat(
filename, 'Empty diff is not supported yet.\n')
- out.append(patch.FilePatchDiff(filename, diff, svn_props))
+ p = patch.FilePatchDiff(filename, diff, svn_props)
+ out.append(p)
if status[0] == 'A':
# It won't be set for empty file.
- out[-1].is_new = True
+ p.is_new = True
+ if status[1] == '+' and not (p.source_filename or p.svn_properties):
+ raise patch.UnsupportedPatchFormat(
+ filename, 'Failed to process the svn properties')
else:
raise patch.UnsupportedPatchFormat(
filename, 'Change with status \'%s\' is not supported.' % status)
« no previous file with comments | « patch.py ('k') | tests/patch_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698