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

Unified Diff: fetch.py

Issue 138623008: Fix a typo for "--dry-run" in the usage message. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Rename self.options.dryrun to self.options.dry_run Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fetch.py
===================================================================
--- fetch.py (revision 250631)
+++ fetch.py (working copy)
@@ -60,7 +60,7 @@
def run(self, cmd, **kwargs):
print 'Running: %s' % (' '.join(pipes.quote(x) for x in cmd))
- if self.options.dryrun:
+ if self.options.dry_run:
return 0
return subprocess.check_call(cmd, **kwargs)
@@ -121,7 +121,7 @@
# Configure git.
wd = os.path.join(self.base, self.root)
- if self.options.dryrun:
+ if self.options.dry_run:
print 'cd %s' % wd
self.run_git(
'submodule', 'foreach',
@@ -157,7 +157,7 @@
if real_path != self.root:
real_path = os.path.join(self.root, real_path)
wd = os.path.join(self.base, real_path)
- if self.options.dryrun:
+ if self.options.dry_run:
print 'cd %s' % wd
self.run_git('svn', 'init', '--prefix=origin/', '-T',
svn_spec['svn_branch'], svn_spec['svn_url'], cwd=wd)
@@ -203,7 +203,7 @@
Valid options:
-h, --help, help Print this message.
--nohooks Don't run hooks after checkout.
- -n, --dryrun Don't run commands, only print them.
+ -n, --dry-run Don't run commands, only print them.
""" % os.path.basename(sys.argv[0]))
sys.exit(bool(msg))
@@ -215,7 +215,7 @@
if argv[1] in ('-h', '--help', 'help'):
usage()
- dryrun = False
+ dry_run = False
nohooks = False
while len(argv) >= 2:
arg = argv[1]
@@ -223,7 +223,7 @@
break
argv.pop(1)
if arg in ('-n', '--dry-run'):
- dryrun = True
+ dry_run = True
elif arg == '--nohooks':
nohooks = True
else:
@@ -238,7 +238,7 @@
recipe = argv[1]
props = argv[2:]
- return optparse.Values({'dryrun':dryrun, 'nohooks':nohooks }), recipe, props
+ return optparse.Values({'dry_run':dry_run, 'nohooks':nohooks }), recipe, props
wtc 2014/02/12 06:00:08 I am not sure about this change. I assume the sing
Dirk Pranke 2014/02/12 21:08:04 Yup, that's the right change. LGTM, thanks!
def run_recipe_fetch(recipe, props, aliased=False):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698