firefoxreleases: bump minimum version requirement; r=sheehan
authorGregory Szorc <gps@mozilla.com>
Tue, 22 May 2018 19:36:09 +0000
changeset 5985 759bff2dff9b
parent 5984 97c68eb25ad2
child 5986 03eeb833e384
push id2840
push usergszorc@mozilla.com
push date2018-05-22 20:30 +0000
treeherderversion-control-tools@759bff2dff9b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssheehan
firefoxreleases: bump minimum version requirement; r=sheehan We only run this extension on hgweb, which is currently running Mercurial 4.4. We can safely drop support for old versions and the compatibility code that came with it. We still maintain support for Mercurial 4.3 because that's what the local testing virtualenv is running. Hopefully that will get bumped to 4.4 soon. Differential Revision: https://phabricator.services.mozilla.com/D1343
hgext/firefoxreleases/__init__.py
--- a/hgext/firefoxreleases/__init__.py
+++ b/hgext/firefoxreleases/__init__.py
@@ -3,51 +3,48 @@
 
 """Expose Firefox release information."""
 
 import collections
 import os
 
 from mercurial.i18n import _
 from mercurial import (
+    configitems,
     error,
     extensions,
     registrar,
     revset,
-    util,
 )
 from mercurial.hgweb import (
     webcommands,
     webutil,
 )
 
 OUR_DIR = os.path.normpath(os.path.dirname(__file__))
 execfile(os.path.join(OUR_DIR, '..', 'bootstrap.py'))
 
 import mozautomation.releasedb as releasedb
 
 from mozhg.util import (
-    import_module,
     is_firefox_repo,
 )
 
-# TRACKING hg43
-configitems = import_module('mercurial.configitems')
 
-minimumhgversion = '4.1'
-testedwith = '4.1 4.2 4.3 4.4'
+minimumhgversion = '4.3'
+testedwith = '4.3 4.4'
 
-if util.safehasattr(registrar, 'configitem'):
-    configtable = {}
-    configitem  = registrar.configitem(configtable)
+configtable = {}
+configitem  = registrar.configitem(configtable)
 
-    configitem('mozilla', 'enablefirefoxreleases',
-               default=configitems.dynamicdefault)
-    configitem('mozilla', 'firefoxreleasesdb',
-               default=configitems.dynamicdefault)
+configitem('mozilla', 'enablefirefoxreleases',
+           default=configitems.dynamicdefault)
+configitem('mozilla', 'firefoxreleasesdb',
+           default=configitems.dynamicdefault)
+
 
 def extsetup(ui):
     extensions.wrapfunction(webutil, 'changesetentry', changesetentry)
 
     setattr(webcommands, 'firefoxreleases', firefox_releases_web_command)
     webcommands.__all__.append('firefoxreleases')
 
     # TODO remove once we can use @revsetpredicate from extensions