configwizard: avoid set literals syntax (bug 1282293); r?glob draft
authorGregory Szorc <gps@mozilla.com>
Tue, 28 Jun 2016 07:40:34 -0700
changeset 8667 55bf9b956205489b8ef47bc98a9e1c9f24dec617
parent 8666 d6581fe622466d41cec140ad70d71918480d00da
child 8668 45abe127c72597ee52ea23f36cc861e87458a7e1
push id955
push usergszorc@mozilla.com
push dateTue, 28 Jun 2016 14:58:18 +0000
reviewersglob
bugs1282293
configwizard: avoid set literals syntax (bug 1282293); r?glob set literals are added in Python 2.7. If running a Mercurial using Python 2.6 (as you'll find on some Linux distributions), this will cause things to break. Stop using set literals to allow the extension to load. MozReview-Commit-ID: GdlLGxPWQkB
hgext/configwizard/__init__.py
--- a/hgext/configwizard/__init__.py
+++ b/hgext/configwizard/__init__.py
@@ -267,17 +267,17 @@ cmdtable = {}
 
 # We want the extension to load on ancient versions of Mercurial.
 # cmdutil.command was introduced in 1.9.
 try:
     command = cmdutil.command(cmdtable)
 except AttributeError:
     command = None
 
-wizardsteps = {
+wizardsteps = set([
     'hgversion',
     'username',
     'diff',
     'color',
     'pager',
     'curses',
     'historyediting',
     'fsmonitor',
@@ -285,17 +285,17 @@ wizardsteps = {
     'wip',
     'security',
     'firefoxtree',
     'codereview',
     'pushtotry',
     'multiplevct',
     'configchange',
     'permissions',
-}
+])
 
 
 def configwizard(ui, repo, statedir=None, **opts):
     """Ensure your Mercurial configuration is up to date."""
     runsteps = set(wizardsteps)
     if ui.hasconfig('configwizard', 'steps'):
         runsteps = set(ui.configlist('configwizard', 'steps'))
 
@@ -520,22 +520,22 @@ def _promptvctextension(ui, cw, ext, msg
     if uipromptchoice(ui, '%s (Yn) $$ &Yes $$ &No' % msg):
         return
 
     _enableext(cw, ext, ext_path)
 
 
 def _checkpager(ui, cw):
     haveext = ui.hasconfig('extensions', 'pager')
-    attends = {
+    attends = set([
         'help',
         'incoming',
         'outgoing',
         'status',
-    }
+    ])
 
     haveattends = all(ui.hasconfig('pager', 'attend-%s' % a) for a in attends)
     haveconfig = ui.hasconfig('pager', 'pager')
 
     if haveext and haveattends and haveconfig:
         return
 
     answer = uipromptchoice(ui, PAGER_INFO, default=0) + 1