Bug 1380791 - Get rid of support for known-good revision from mozilla-messaging. r=jorgk
authorTom Prince <mozilla@hocat.ca>
Thu, 13 Jul 2017 14:06:56 -0600
changeset 28443 7be30a48e5cf2c7d70fadb1f348879c17806c5f5
parent 28442 0e10366a7f2b91d381c0f761a09578225e87f8f0
child 28444 9faaede6aff6823a8a9df248a4c275b3ac8c19c5
push idunknown
push userunknown
push dateunknown
reviewersjorgk
bugs1380791
Bug 1380791 - Get rid of support for known-good revision from mozilla-messaging. r=jorgk MozReview-Commit-ID: 8TXttWwFv8a
client.py
--- a/client.py
+++ b/client.py
@@ -68,17 +68,16 @@ if pyver[0] <= 1 or (pyver[0] == 2 and p
 elif pyver[0] >= 3:
     # Python series 3 will syntax error here, Hack needed per Bug 601649c#8
     print "ERROR: Python series 3 is not supported, use python 2.7"
     sys.exit()  # Do an explicit sys.exit for code clarity.
 del pyver
 
 import os
 from optparse import OptionParser, OptionValueError
-import urllib2
 import re
 
 topsrcdir = os.path.dirname(__file__)
 if topsrcdir == '':
     topsrcdir = '.'
 
 TREE_STATE_FILE = os.path.join(topsrcdir, '.treestate')
 
@@ -412,19 +411,16 @@ o.add_option("-z", "--mozilla-repo", des
              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. 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",
              action="store_true", default=False,
              help="Skip pulling the DOM Inspector repository.")
 o.add_option("--inspector-rev", dest="inspector_rev",
@@ -580,28 +576,16 @@ def fixup_inspector_repo_options(options
             not os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions',
                                             'inspector')):
         options.inspector_repo = DEFAULTS['INSPECTOR_REPO']
 
     if options.inspector_rev is None:
         options.inspector_rev = get_DEFAULT_tag("INSPECTOR_REV")
 
 
-def get_last_known_good_mozilla_rev():
-    kg_url = "http://build.mozillamessaging.com/buildbot/production/known-good-revisions/mozilla-central.txt"
-    try:
-        rev = urllib2.urlopen(kg_url).read().strip()
-    except IOError, err:
-        sys.exit("Error: could not fetch '%s' (%s)" % (kg_url, err))
-    if re.search(r'^[a-f0-9]+$', rev) and len(rev) == 12:
-        return rev
-    else:
-        sys.exit("Error: invalid contents fetched from %s: '%s'" %
-                 (kg_url, rev))
-
 try:
     (options, (action,)) = o.parse_args()
 except ValueError:
     o.print_help()
     sys.exit(2)
 
 if options.default_rev:
     # We now wish to override all the DEFAULTS.
@@ -616,21 +600,16 @@ if action in ('checkout', 'co'):
     # Update Comm repository configuration.
     repo_config()
 
     if not options.skip_comm:
         fixup_comm_repo_options(options)
         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"
-            options.mozilla_rev = get_last_known_good_mozilla_rev()
-            print "Setting mozilla_rev to '%s'" % options.mozilla_rev
-
         fixup_mozilla_repo_options(options)
         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) and \
        not os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions')):
         # Don't create the directory: Mozilla repository should provide it...