Make client.py print what was pulled from CVS/hg.
b=433390 r=jorendorff, ted.mielczarek
--- a/client.py
+++ b/client.py
@@ -9,16 +9,17 @@ NSS_DIRS = ('dbm',
'security/coreconf',
'security/dbm')
# URL of the default hg repository to clone for Tamarin.
DEFAULT_TAMARIN_REPO = 'http://hg.mozilla.org/tamarin-central/'
import os
import sys
+import datetime
from optparse import OptionParser
topsrcdir = os.path.dirname(__file__)
if topsrcdir == '':
topsrcdir = '.'
try:
from subprocess import check_call
@@ -42,27 +43,31 @@ def do_hg_pull(dir, repository, hg):
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 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):
"""Check out a CVS directory.
modules is a list of directories to check out, e.g. ['nsprpub']
"""
for module in modules:
(parent, leaf) = os.path.split(module)
+ print "CVS checkout begin: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
check_call_noisy([cvs, '-d', cvsroot,
'checkout', '-P', '-r', tag, '-d', leaf,
'mozilla/%s' % module],
cwd=os.path.join(topsrcdir, parent))
+ print "CVS checkout end: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
o = OptionParser(usage="client.py [options] checkout")
o.add_option("-m", "--mozilla-repo", dest="mozilla_repo",
default=None,
help="URL of Mozilla repository to pull from (default: use hg default in .hg/hgrc)")
o.add_option("--skip-mozilla", dest="skip_mozilla",
action="store_true", default=False,
help="Skip pulling the Mozilla repository.")