Bug 1203838 - Thunderbird release builds don't update gecko to the release tag. r=Callek a=aleth
authorPhilipp Kewisch <mozilla@kewis.ch>
Fri, 18 Sep 2015 13:46:23 +0200
changeset 22195 748fe457467dccb9bfc5490942d8128ed3d3349e
parent 22194 98d018a906d26bd0b656bb5847a66fc00269783b
child 22196 7cd62350f863ed5caf968929a826f564fdf5c9a0
push id57
push userkent@caspia.com
push dateWed, 04 Nov 2015 21:52:11 +0000
treeherdercomm-esr38@748fe457467d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek, aleth
bugs1203838
Bug 1203838 - Thunderbird release builds don't update gecko to the release tag. r=Callek a=aleth
client.py
--- a/client.py
+++ b/client.py
@@ -542,25 +542,30 @@ 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 COMM_REV is passed via environment, prefer that over the passed
+    # option so that automation can pass tagged versions while still defaulting
+    # to a certain revision via client.py-args.
+    envRev = os.environ.get("COMM_REV")
+    if envRev:
+        if options.comm_rev and options.comm_rev != envRev:
+            print "Warning: Preferring COMM_REV (%s) over passed revision (%s)" % (envRev, options.comm_rev)
+        else:
+            print "Using COMM_REV from environment (%s)" % envRev
+        options.comm_rev = envRev
+
+    # If no version was set before, use the default comm revision.
     if options.comm_rev is None:
-        # 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")
+        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:
@@ -574,25 +579,30 @@ 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 MOZILLA_REV is passed via environment, prefer that over the passed
+    # option so that automation can pass tagged versions while still defaulting
+    # to a certain revision via client.py-args.
+    envRev = os.environ.get("MOZILLA_REV")
+    if envRev:
+        if options.mozilla_rev and options.mozilla_rev != envRev:
+            print "Warning: Preferring MOZILLA_REV (%s) over passed revision (%s)" % (envRev, options.mozilla_rev)
+        else:
+            print "Using MOZILLA_REV from environment (%s)" % envRev
+        options.mozilla_rev = envRev
+
+    # If no version was set before, use the default mozilla revision.
     if options.mozilla_rev is None:
-        # 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")
+        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.
     """