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

Unified Diff: patch.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') | « apply_issue.py ('k') | rietveld.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: patch.py
diff --git a/patch.py b/patch.py
index 18c16e2c82c6d0c41433ed7f041abfdf1686b95f..f6b19aca2ebf5efb488b1135843ee7730247510c 100644
--- a/patch.py
+++ b/patch.py
@@ -89,6 +89,8 @@ class FilePatchDiff(FilePatchBase):
def __init__(self, filename, diff, svn_properties):
super(FilePatchDiff, self).__init__(filename)
+ if not diff:
+ self._fail('File doesn\'t have a diff.')
self.diff_header, self.diff_hunks = self._split_header(diff)
self.svn_properties = svn_properties or []
self.is_git_diff = self._is_git_diff_header(self.diff_header)
« apply_issue.py ('K') | « apply_issue.py ('k') | rietveld.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698