comparison mercurial/commands.py @ 40581: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 db61a18148a4
children 1a6bb5a85e30
comparison
equal deleted inserted replaced
40580:ab893a99b645 40581:ef694e477783
4266 (For more information about the phases concept, see :hg:`help phases`.) 4266 (For more information about the phases concept, see :hg:`help phases`.)
4267 """ 4267 """
4268 opts = pycompat.byteskwargs(opts) 4268 opts = pycompat.byteskwargs(opts)
4269 # search for a unique phase argument 4269 # search for a unique phase argument
4270 targetphase = None 4270 targetphase = None
4271 for idx, name in enumerate(phases.phasenames): 4271 for idx, name in enumerate(phases.cmdphasenames):
4272 if opts.get(name, False): 4272 if opts[name]:
4273 if targetphase is not None: 4273 if targetphase is not None:
4274 raise error.Abort(_('only one phase can be specified')) 4274 raise error.Abort(_('only one phase can be specified'))
4275 targetphase = idx 4275 targetphase = idx
4276 4276
4277 # look for specified revision 4277 # look for specified revision