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
--- 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