Bug 409266 - Allow skipping particular checkouts in client.py, r=luser
authorbenjamin@smedbergs.us
Fri, 21 Dec 2007 16:49:52 -0500
changeset 9014 5603fa93e575d0c274fedfbf3eac4c768f49a412
parent 9013 baffecf28c7e683c42631ed395c591c866a97df7
child 9820 4b4c7b7ea2ad69eede203efbeab5e83c1f96b342
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluser
bugs409266
milestone1.9b3pre
Bug 409266 - Allow skipping particular checkouts in client.py, r=luser
client.py
--- a/client.py
+++ b/client.py
@@ -58,19 +58,34 @@ def do_cvs_checkout(modules, tag, cvsroo
                           'checkout', '-P', '-r', tag, '-d', leaf,
                           'mozilla/%s' % module],
                          cwd=os.path.join(topsrcdir, parent))
 
 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.")
+
 o.add_option("-t", "--tamarin-repo", dest="tamarin_repo",
              default=None,
              help="URL of Tamarin repository to pull from (default: use hg default in js/tamarin/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULT_TAMARIN_REPO + "\".)")
+o.add_option("--skip-tamarin", dest="skip_tamarin",
+             action="store_true", default=False,
+             help="Skip pulling the Tamarin repository.")
+
+o.add_option("--skip-nspr", dest="skip_nspr",
+             action="store_true", default=False,
+             help="Skip pulling the NSPR repository.")
+o.add_option("--skip-nss", dest="skip_nss",
+             action="store_true", default=False,
+             help="Skip pulling the NSS repository.")
+
 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")
 
@@ -101,15 +116,23 @@ try:
     (options, (action,)) = o.parse_args()
 except ValueError:
     o.print_help()
     sys.exit(2)
 
 fixup_repo_options(options)
 
 if action in ('checkout', 'co'):
-    do_cvs_checkout(NSPR_DIRS, NSPR_CO_TAG, options.cvsroot, options.cvs)
-    do_cvs_checkout(NSS_DIRS, NSS_CO_TAG, options.cvsroot, options.cvs)
-    do_hg_pull('js/tamarin', options.tamarin_repo, options.hg)
-    do_hg_pull('.', options.mozilla_repo, options.hg)
+    if not options.skip_nspr:
+        do_cvs_checkout(NSPR_DIRS, NSPR_CO_TAG, options.cvsroot, options.cvs)
+
+    if not options.skip_nss:
+        do_cvs_checkout(NSS_DIRS, NSS_CO_TAG, options.cvsroot, options.cvs)
+
+    if not options.skip_tamarin:
+        do_hg_pull('js/tamarin', options.tamarin_repo, options.hg)
+
+    if not options.skip_mozilla:
+        do_hg_pull('.', options.mozilla_repo, options.hg)
+
 else:
     o.print_help()
     sys.exit(2)