Bug 909952 Remove unnecessary l10n *_REV arguments, as these are not necessary and break the build. Also add an additional possible location for hgtool to work with releng systems better. r=jcranmer,a=Standard8
authorMark Banner <standard8@mozilla.com>
Tue, 22 Apr 2014 14:31:32 +0100
changeset 23773 4409679b6df5f353b602216226cb4b189305940a
parent 23772 6771e0bf853e53ab6aefb09cfb8dce2daab6f587
child 23774 af08addd69773d16b4250b8d17b33804f2146a0a
push id1389
push usermkmelin@iki.fi
push dateWed, 23 Apr 2014 18:55:51 +0000
treeherdertry-comm-central@df67ddf3efb5 [default view] [failures only]
reviewersjcranmer, Standard8
Bug 909952 Remove unnecessary l10n *_REV arguments, as these are not necessary and break the build. Also add an additional possible location for hgtool to work with releng systems better. r=jcranmer,a=Standard8
--- a/build/client.py-args
+++ b/build/client.py-args
@@ -1,1 +1,1 @@
---hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print
+--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --hgtool1=../scripts/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print
--- a/build/client.py-l10n-args
+++ b/build/client.py-l10n-args
@@ -1,1 +1,1 @@
---hg-options='--time' --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print --comm-rev=${COMM_REV} --mozilla-rev=${MOZILLA_REV}
+--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --hgtool1=../scripts/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print
--- a/client.py
+++ b/client.py
@@ -308,30 +308,34 @@ def backup_cvs_extension(extensionName, 
     print "Moving %s to %s-cvs..." % (extensionDir, extensionDir)
         os.rename(extensionPath, extensionBackupPath)
         # Print the exception without its traceback.
         sys.excepthook(sys.exc_info()[0], sys.exc_info()[1], None)
         sys.exit("Error: %s directory renaming failed!" % extensionName)
-def do_hg_pull(dir, repository, hg, rev, hgtool=None):
+def do_hg_pull(dir, repository, hg, rev, hgtool=None, hgtool1=None):
     """Clone if the dir doesn't exist, pull if it does.
     fulldir = os.path.join(topsrcdir, dir)
     hgcloneopts = []
     if options.hgcloneopts:
         hgcloneopts = options.hgcloneopts.split()
     hgopts = []
     if options.hgopts:
         hgopts = options.hgopts.split()
+    if hgtool or hgtool1:
+        if not os.path.exists(hgtool):
+          hgtool = hgtool1
     if hgtool:
         hgtoolcmd = hgtool.split()
         # We need to strip the trailing slash from the repository url so that the hg tool gets a
         # url that's consistent with the rest of the build automation.
         check_call_noisy(['python'] + hgtoolcmd + [repository.rstrip('/'), fulldir], retryMax=options.retries)
     elif not os.path.exists(fulldir):
         fulldir = os.path.join(topsrcdir, dir)
         check_call_noisy([hg, 'clone'] + hgcloneopts + hgopts + [repository, fulldir],
@@ -365,23 +369,23 @@ def do_hg_pull(dir, repository, hg, rev,
 def check_retries_option(option, opt_str, value, parser):
   if value < 0:
     raise OptionValueError("%s option value needs to be positive (not '%d')" % (opt_str, value))
   setattr(parser.values, option.dest, value)
 def do_apply_patch(hg, patch, repo):
-    check_call_noisy([hg, 
-        'import', 
+    check_call_noisy([hg,
+        'import',
         '-R', repo,
         '-m', "local patch from %s" % patch,
         '--no-commit', '--force',
-        ], 
+        ],
 import glob
 def do_apply_patches(topsrcdir, hg):
     prefix_map = {
         'mozilla': 'mozilla',
         'chatzilla': os.path.join('mozilla', 'extensions', 'irc'),
@@ -466,16 +470,19 @@ o.add_option("--venkman-rev", dest = "ve
 o.add_option("--hg", dest="hg", default=os.environ.get('HG', 'hg'),
              help="The location of the hg binary")
 o.add_option("-v", "--verbose", dest="verbose",
              action="store_true", default=False,
              help="Enable verbose output on hg updates")
 o.add_option("--hgtool", dest="hgtool",
              help="Path to hgtool, if wanted")
+o.add_option("--hgtool1", dest="hgtool1",
+             default=None,
+             help="Alternative path to hgtool, if wanted")
 o.add_option("--hg-options", dest="hgopts",
              help="Pass arbitrary options to hg commands (i.e. --debug, --time)")
 o.add_option("--hg-clone-options", dest="hgcloneopts",
              help="Pass arbitrary options to hg clone commands (i.e. --uncompressed)")
 o.add_option("--retries", dest="retries", type="int", metavar="NUM",
              default=1, help="Number of times to retry a failed command before giving up. (default: 1)",
              action="callback", callback=check_retries_option)
@@ -643,22 +650,22 @@ if action in ('checkout', 'co'):
     if not options.skip_comm:
         do_hg_pull('.', options.comm_repo, options.hg, options.comm_rev)
     if not options.skip_mozilla:
         if options.known_good and options.mozilla_rev is None:
-            print "Fetching last known good mozilla revision" 
+            print "Fetching last known good mozilla revision"
             options.mozilla_rev = get_last_known_good_mozilla_rev()
             print "Setting mozilla_rev to '%s'" % options.mozilla_rev
-        do_hg_pull('mozilla', options.mozilla_repo, options.hg, options.mozilla_rev, options.hgtool)
+        do_hg_pull('mozilla', options.mozilla_repo, options.hg, options.mozilla_rev, options.hgtool, options.hgtool1)
     # Check whether destination directory exists for these extensions.
     if (not options.skip_chatzilla or not options.skip_inspector or \
                 not options.skip_venkman) and \
             not os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions')):
         # Don't create the directory: Mozilla repository should provide it...
         sys.exit("Error: mozilla/extensions directory does not exist;" + \
                  " ChatZilla, DOM Inspector and/or Venkman cannot be checked out!")
@@ -673,15 +680,15 @@ if action in ('checkout', 'co'):
     if not options.skip_ldap:
         do_hg_pull(os.path.join('ldap', 'sdks'), options.ldap_repo, options.hg, options.ldap_rev)
     if not options.skip_venkman:
         do_hg_pull(os.path.join('mozilla', 'extensions', 'venkman'), options.venkman_repo, options.hg, options.venkman_rev)
     if options.apply_patches:
         do_apply_patches(topsrcdir, options.hg)