changeset 40628:ef694e477783

phase: use the `phases.cmdphasenames` constant to walk available command flags This reverts 1ea6772fb415.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 10 Nov 2018 13:37:18 -0500
parents ab893a99b645
children a4c2788e8f48
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Nov 09 23:19:53 2018 -0500
+++ b/mercurial/commands.py	Sat Nov 10 13:37:18 2018 -0500
@@ -4268,8 +4268,8 @@
     opts = pycompat.byteskwargs(opts)
     # search for a unique phase argument
     targetphase = None
-    for idx, name in enumerate(phases.phasenames):
-        if opts.get(name, False):
+    for idx, name in enumerate(phases.cmdphasenames):
+        if opts[name]:
             if targetphase is not None:
                 raise error.Abort(_('only one phase can be specified'))
             targetphase = idx