--- a/client.py
+++ b/client.py
@@ -46,17 +46,20 @@ def check_call_noisy(cmd, *args, **kwarg
def do_hg_pull(dir, repository, hg):
fulldir = os.path.join(topsrcdir, dir)
# clone if the dir doesn't exist, pull if it does
if not os.path.exists(fulldir):
fulldir = os.path.join(topsrcdir, dir)
check_call_noisy([hg, 'clone', repository, fulldir])
else:
- cmd = [hg, 'pull', '-u', '-R', fulldir]
+ if options.verbose:
+ cmd = [hg, 'pull', '-u', '-v', '-R', fulldir]
+ else:
+ cmd = [hg, 'pull', '-u', '-R', fulldir]
if repository is not None:
cmd.append(repository)
check_call_noisy(cmd)
check_call([hg, 'parent', '-R', fulldir,
'--template=Updated to revision {node}.\n'])
def do_cvs_checkout(modules, tag, cvsroot, cvs, checkoutdir):
"""Check out a CVS directory into the mozilla/ subdirectory.
@@ -101,16 +104,19 @@ o.add_option("--skip-calendar", dest="sk
o.add_option("--hg", dest="hg", default=os.environ.get('HG', 'hg'),
help="The location of the hg binary")
o.add_option("--cvs", dest="cvs", default=os.environ.get('CVS', 'cvs'),
help="The location of the cvs binary")
o.add_option("--cvsroot", dest="cvsroot",
default=os.environ.get('CVSROOT', ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot'),
help="The CVSROOT (default: :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot")
+o.add_option("-v", "--verbose", dest="verbose",
+ action="store_true", default=False,
+ help="Enable verbose output on hg updates")
def fixup_repo_options(options):
""" Check options.comm_repo and options.mozilla_repo values;
populate mozilla_repo if needed.
options.comm_repo and options.mozilla_repo are normally None.
This is fine-- our "hg pull" commands will omit the repo URL.