Bug 763769 - Release sanity complains about Thunderbird mozconfigs. r=Standard8
authorBen Hearsum <bhearsum@mozilla.com>
Tue, 19 Jun 2012 16:14:34 +0100
changeset 12679 67d6bb332321e2b8ccb23e2fc5c3464c9c4beb6f
parent 12678 09ee92ece7f2ebc55658c2eb38a5781d8adccdb1
child 12680 49aefca73b7a730d0b5d9a6c06f5920417d949b5
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs763769
Bug 763769 - Release sanity complains about Thunderbird mozconfigs. r=Standard8
client.py
mail/config/mozconfigs/linux32/release
mail/config/mozconfigs/linux64/release
mail/config/mozconfigs/macosx-universal/release
mail/config/mozconfigs/win32/release
--- a/client.py
+++ b/client.py
@@ -397,27 +397,27 @@ o = OptionParser(usage="%prog [options] 
 o.add_option("-m", "--comm-repo", dest="comm_repo",
              default=None,
              help="URL of comm (Calendar/Mail/Suite) repository to pull from (default: use hg default in .hg/hgrc)")
 o.add_option("--skip-comm", dest="skip_comm",
              action="store_true", default=False,
              help="Skip pulling the comm (Calendar/Mail/Suite) repository.")
 o.add_option("--comm-rev", dest="comm_rev",
              default=None,
-             help="Revision of comm (Calendar/Mail/Suite) repository to update to. Default: \"" + get_DEFAULT_tag('COMM_REV') + "\"")
+             help="Revision of comm (Calendar/Mail/Suite) repository to update to. If not present, COMM_REV from the environment will be used. If that doesn't exist the default is: \"" + get_DEFAULT_tag('COMM_REV') + "\"")
 
 o.add_option("-z", "--mozilla-repo", dest="mozilla_repo",
              default=None,
              help="URL of Mozilla repository to pull from (default: use hg default in mozilla/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULTS['MOZILLA_REPO'] + "\".)")
 o.add_option("--skip-mozilla", dest="skip_mozilla",
              action="store_true", default=False,
              help="Skip pulling the Mozilla repository.")
 o.add_option("--mozilla-rev", dest="mozilla_rev",
              default=None,
-             help="Revision of Mozilla repository to update to. Default: \"" + get_DEFAULT_tag('MOZILLA_REV') + "\"")
+             help="Revision of Mozilla repository to update to. If not present, MOZILLA_REV from the environment will be used. If that doesn't exist the default is: \"" + get_DEFAULT_tag('MOZILLA_REV') + "\"")
 o.add_option("--known-good", dest="known_good",
              action="store_true", default=False,
              help="Use the last known-good Mozilla repository revision.")
 
 o.add_option("--inspector-repo", dest="inspector_repo",
              default=None,
              help="URL of DOM Inspector repository to pull from (default: use hg default in mozilla/extensions/inspector/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULTS['INSPECTOR_REPO'] + "\".)")
 o.add_option("--skip-inspector", dest="skip_inspector",
@@ -498,17 +498,24 @@ def fixup_comm_repo_options(options):
     if options.comm_repo is None and \
             not os.path.exists(os.path.join(topsrcdir, '.hg')):
         o.print_help()
         print
         print "Error: the -m option is required for the initial checkout!"
         sys.exit(2)
 
     if options.comm_rev is None:
-        options.comm_rev = get_DEFAULT_tag("COMM_REV")
+        # If we weren't passed an explicit rev, try to find it from the
+        # environment. If that doesn't exist or is empty, grab the default.
+        envRev = os.environ.get("COMM_REV")
+        if envRev:
+            print "Using COMM_REV from environment (%s)" % envRev
+            options.comm_rev = envRev
+        else:
+            options.comm_rev = get_DEFAULT_tag("COMM_REV")
 
 def fixup_mozilla_repo_options(options):
     """Handle special case: initial checkout of Mozilla.
 
     See fixup_comm_repo_options().
     """
     if options.mozilla_repo is None:
         if not os.path.exists(os.path.join(topsrcdir, 'mozilla')):
@@ -521,17 +528,24 @@ def fixup_mozilla_repo_options(options):
             config.read([config_path])
             if not config.has_option('paths', 'default'):
                 # Abort, not to get into a possibly inconsistent state.
                 sys.exit("Error: default path in %s is undefined!" % config_path)
 
             options.mozilla_repo = config.get('paths', 'default')
 
     if options.mozilla_rev is None:
-        options.mozilla_rev = get_DEFAULT_tag("MOZILLA_REV")
+        # If we weren't passed an explicit rev, try to find it from the
+        # environment. If that doesn't exist or is empty, grab the default.
+        envRev = os.environ.get("MOZILLA_REV")
+        if envRev:
+            print "Using MOZILLA_REV from environment (%s)" % envRev
+            options.mozilla_rev = envRev
+        else:
+            options.mozilla_rev = get_DEFAULT_tag("MOZILLA_REV")
 
 def fixup_chatzilla_repo_options(options):
     """Handle special case: initial hg checkout of Chatzilla.
 
     See fixup_comm_repo_options().
     backup_cvs_extension() is also called.
     """
 
--- a/mail/config/mozconfigs/linux32/release
+++ b/mail/config/mozconfigs/linux32/release
@@ -14,10 +14,10 @@ export MOZILLA_OFFICIAL=1
 # For NSS symbols
 export MOZ_DEBUG_SYMBOLS=1
 
 # Enable parallel compiling
 CONCURRENCY=$(( `grep processor /proc/cpuinfo | wc -l` + 2 ))
 mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"
 
 # Run client.py
-mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print --comm-rev=${COMM_REV} --mozilla-rev=${MOZILLA_REV}"
+mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print"
 mk_add_options ALWAYS_RUN_CLIENT_PY=1
--- a/mail/config/mozconfigs/linux64/release
+++ b/mail/config/mozconfigs/linux64/release
@@ -14,10 +14,10 @@ export MOZILLA_OFFICIAL=1
 # For NSS symbols
 export MOZ_DEBUG_SYMBOLS=1
 
 # Enable parallel compiling
 CONCURRENCY=$(( `grep processor /proc/cpuinfo | wc -l` + 2 ))
 mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"
 
 # Run client.py
-mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print --comm-rev=${COMM_REV} --mozilla-rev=${MOZILLA_REV}"
+mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print"
 mk_add_options ALWAYS_RUN_CLIENT_PY=1
--- a/mail/config/mozconfigs/macosx-universal/release
+++ b/mail/config/mozconfigs/macosx-universal/release
@@ -21,10 +21,10 @@ export MOZ_DEBUG_SYMBOLS=1
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Enable parallel compiling
 CONCURRENCY=$(( `sysctl hw.logicalcpu | awk {'print $2'}`  + 2 ))
 mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"
 
 # Run client.py
-mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print --comm-rev=${COMM_REV} --mozilla-rev=${MOZILLA_REV}"
+mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print"
 mk_add_options ALWAYS_RUN_CLIENT_PY=1
--- a/mail/config/mozconfigs/win32/release
+++ b/mail/config/mozconfigs/win32/release
@@ -12,10 +12,10 @@ export MOZILLA_OFFICIAL=1
 
 if test "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64"; then
   . $topsrcdir/build/win32/mozconfig.vs2010-win64
 else
   . $topsrcdir/build/win32/mozconfig.vs2010
 fi
 
 # Run client.py
-mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print --comm-rev=${COMM_REV} --mozilla-rev=${MOZILLA_REV}"
+mk_add_options CLIENT_PY_ARGS="--hg-options='--time' --hgtool=../tools/buildfarm/utils/hgtool.py --skip-chatzilla --skip-comm --skip-inspector --skip-venkman --tinderbox-print"
 mk_add_options ALWAYS_RUN_CLIENT_PY=1