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

Unified Diff: patch.py

Issue 10962038: Fix applying git diff with new file mode 644 on a svn checkout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 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 | « no previous file | testing_support/patches_data.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 44282ddaf1a04b041fce16d680be7a3d927bb0ef..54f5d175a6caa0c619ec85183c3587b16401f87c 100644
--- a/patch.py
+++ b/patch.py
@@ -406,7 +406,9 @@ class FilePatchDiff(FilePatchBase):
# Only look at owner ACL for executable.
if bool(int(mode[4]) & 1):
self.svn_properties.append(('svn:executable', '*'))
- else:
+ elif not self.source_filename and self.is_new:
+ # It's a new file, not from a rename/copy, then there's no property to
+ # delete.
self.svn_properties.append(('svn:executable', None))
return
« no previous file with comments | « no previous file | testing_support/patches_data.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698