From 03d762f2859853a67509cfd6f89d26236ac0ca0e Mon Sep 17 00:00:00 2001 From: "sebmarchand@chromium.org" Date: Fri, 22 Jan 2016 21:13:23 +0000 Subject: [PATCH] Make apply_issue fail if the content of a large file is missing. Currently apply_issue fail if the content of a newly added file is missing (because of the 900ko threshold in upload.py). But this doesn't apply to the large file that get modified (instead of being added). This is wrong because apply_issue will indicates a success without really applying the patch. It looks like the patch content is set to "None" in this cases (the string value, not the empty value None). Review URL: https://codereview.chromium.org/1612323004 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298366 0039d316-1c4b-4281-b951-d872f2087c98 --- rietveld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rietveld.py b/rietveld.py index 8e99e4bc2a..9adc9c5ca1 100644 --- a/rietveld.py +++ b/rietveld.py @@ -148,7 +148,7 @@ class Rietveld(object): out.append(patch.FilePatchDelete(filename, state['is_binary'])) else: content = self.get_file_content(issue, patchset, state['id']) - if not content: + if not content or content == 'None': # As a precaution due to a bug in upload.py for git checkout, refuse # empty files. If it's empty, it's not a binary file. raise patch.UnsupportedPatchFormat(