# HG changeset patch # User Matt Harbison # Date 2018-11-10 04:19:53 # Node ID ab893a99b6451cada6c5d773817fa14043a853dd # Parent aca09df32819d8571cd94bf5827b33c604191a8d phases: add a list of names usable by the phase command This is useful in TortoiseHg for example, which has until recently just added all names in the `phasenames` list to the context menu that changes the phase. The ones not supported by the command would just error out. diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -133,8 +133,9 @@ archived = HIDEABLE_FLAG allphases = range(internal + 1) trackedphases = allphases[1:] # record phase names +cmdphasenames = ['public', 'draft', 'secret'] # known to `hg phase` command phasenames = [None] * len(allphases) -phasenames[:3] = ['public', 'draft', 'secret'] +phasenames[:len(cmdphasenames)] = cmdphasenames phasenames[archived] = 'archived' phasenames[internal] = 'internal' # record phase property