configwizard: remove code for enabling progress extension (bug 1277406); r=glob draft
authorGregory Szorc <gps@mozilla.com>
Wed, 01 Jun 2016 13:57:55 -0700
changeset 8497 57cf6aa564b83f61765505a3d18ec03dedb7cd0a
parent 8496 de3e8012ca95bee652eb035da24d2ff74f58931d
child 8498 12be4bfbca37081642f4ef0768f524fca7aa7c55
push id918
push userbmo:gps@mozilla.com
push dateThu, 09 Jun 2016 19:23:31 +0000
reviewersglob
bugs1277406
configwizard: remove code for enabling progress extension (bug 1277406); r=glob It is enabled by default in Mercurial 3.5, which everyone should be running by now. MozReview-Commit-ID: bwstTP2Mpg
hgext/configwizard/hgsetup/wizard.py
--- a/hgext/configwizard/hgsetup/wizard.py
+++ b/hgext/configwizard/hgsetup/wizard.py
@@ -239,21 +239,16 @@ class MercurialSetupWizard(object):
 
         hg = get_hg_path()
         config_path = config_file(config_paths)
 
         self.updater.update_all()
 
         hg_version = get_hg_version(hg)
 
-        # Progress is built into core and enabled by default in Mercurial 3.5.
-        if hg_version < LooseVersion('3.5'):
-            self.prompt_native_extension(c, 'progress',
-                'Would you like to see progress bars during Mercurial operations')
-
         # hgwatchman is provided by MozillaBuild and we don't yet support
         # Linux/BSD.
         if ('hgwatchman' not in c.extensions
             and sys.platform.startswith('darwin')
             and hg_version >= HGWATCHMAN_MINIMUM_VERSION
             and self._prompt_yn(HGWATCHMAN_INFO)):
             # Unlike other extensions, we need to run an installer
             # to compile a Python C extension.
@@ -389,24 +384,16 @@ class MercurialSetupWizard(object):
                     # this is a regular file.
                     mode = mode & stat.S_IRWXU
                     print('Changing permissions of %s' % config_path)
                     os.chmod(config_path, mode)
 
         print(FINISHED)
         return 0
 
-    def prompt_native_extension(self, c, name, prompt_text):
-        # Ask the user if the specified extension bundled with Mercurial should be enabled.
-        if name in c.extensions:
-            return
-        if self._prompt_yn(prompt_text):
-            c.activate_extension(name)
-            print('Activated %s extension.\n' % name)
-
     def can_use_extension(self, c, name, path=None):
         # Load extension to hg and search stdout for printed exceptions
         if not path:
             path = os.path.join(self.vcs_tools_dir, 'hgext', name)
         result = subprocess.check_output(['hg',
              '--config', 'extensions.testmodule=%s' % path,
              '--config', 'ui.traceback=true'],
             stderr=subprocess.STDOUT)