# HG changeset patch # User Boris Feld # Date 1534979719 -7200 # Node ID 1ea6772fb415536963c1bafa42fe017c64204856 # Parent 160bd45cc6af78282b7e085fabf0546fbbc4569a phase: handle phase with no command flag Before this changeset, all existing phases have a corresponding flag on the `hg phase` command. (eg: `hg phase --draft`). After this changeset, a phase can exists without having an associated flag. This is useful to introduce a new internal phase that we do not want to expose to user. diff -r 160bd45cc6af -r 1ea6772fb415 mercurial/commands.py --- a/mercurial/commands.py Tue Jun 05 20:47:52 2018 +0200 +++ b/mercurial/commands.py Thu Aug 23 01:15:19 2018 +0200 @@ -4030,7 +4030,7 @@ # search for a unique phase argument targetphase = None for idx, name in enumerate(phases.phasenames): - if opts[name]: + if opts.get(name, False): if targetphase is not None: raise error.Abort(_('only one phase can be specified')) targetphase = idx