[PATCH] phases: add a list of names usable by the phase command

Yuya Nishihara yuya at tcha.org
Sat Nov 10 07:41:15 EST 2018


On Fri, 09 Nov 2018 23:21:00 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1541823593 18000
> #      Fri Nov 09 23:19:53 2018 -0500
> # Node ID 12146514f35e0ad4dcce4d8eadf5d104a065595d
> # Parent  157f0e29eaa35adc2488709f5c00f2865a4d5361
> 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

Can you update commands.phase() to leverage this constant? 1ea6772fb415 can
be backed out.


More information about the Mercurial-devel mailing list