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

Unified Diff: checkout.py

Issue 10890039: Enable support to remove the executable bit on the CQ. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Silence propdel when the property didn't exist Created 8 years, 4 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 | patch.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: checkout.py
diff --git a/checkout.py b/checkout.py
index c61552f32cbe8064e044fcfb29ef99230e5685c5..c6743479da4d4424c591d86f55fede84a50c0cb3 100644
--- a/checkout.py
+++ b/checkout.py
@@ -357,9 +357,13 @@ class SvnCheckout(CheckoutBase, SvnMixIn):
# using above.
stdout += self._check_output_svn(
['add', p.filename, '--force'], credentials=False)
- for prop in p.svn_properties:
- stdout += self._check_output_svn(
- ['propset', prop[0], prop[1], p.filename], credentials=False)
+ for name, value in p.svn_properties:
+ if value is None:
+ stdout += self._check_output_svn(
+ ['propdel', '--quiet', name, p.filename], credentials=False)
+ else:
+ stdout += self._check_output_svn(
+ ['propset', name, value, p.filename], credentials=False)
for prop, values in self.svn_config.auto_props.iteritems():
if fnmatch.fnmatch(p.filename, prop):
for value in values.split(';'):
@@ -528,18 +532,18 @@ class GitCheckoutBase(CheckoutBase):
# p.diff_hunks. git apply manages all that already.
stdout += self._check_output_git(
['apply', '--index', '-p%s' % p.patchlevel], stdin=p.get(True))
- for prop in p.svn_properties:
+ for name, _ in p.svn_properties:
# Ignore some known auto-props flags through .subversion/config,
# bails out on the other ones.
# TODO(maruel): Read ~/.subversion/config and detect the rules that
# applies here to figure out if the property will be correctly
# handled.
- if not prop[0] in (
+ if not name in (
'svn:eol-style', 'svn:executable', 'svn:mime-type'):
raise patch.UnsupportedPatchFormat(
p.filename,
'Cannot apply svn property %s to file %s.' % (
- prop[0], p.filename))
+ name, p.filename))
for post in post_processors:
post(self, p)
except OSError, e:
« no previous file with comments | « no previous file | patch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698