[PATCH 2 of 2 phases] phases: add a phases command to display and manipulate phases

Matt Mackall mpm at selenic.com
Tue Jan 10 13:22:05 CST 2012


On Tue, 2012-01-10 at 19:46 +0100, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1326221135 -3600
> # Node ID 7d7e43c1437fb024509fcdb5696635aea6763f34
> # Parent  9b6069f654f15658f9bd6101a2675208fa77d41b
> phases: add a phases command to display and manipulate phases
> 
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -16,10 +16,11 @@ import sshserver, hgweb, hgweb.server, c
>  import match as matchmod
>  import merge as mergemod
>  import minirst, revset, fileset
>  import dagparser, context, simplemerge
>  import random, setdiscovery, treediscovery, dagutil
> +import phases as phasesmod
>  
>  table = {}
>  
>  command = cmdutil.command(table)
>  
> @@ -4208,10 +4209,65 @@ def paths(ui, repo, search=None):
>          for name, path in ui.configitems("paths"):
>              if ui.quiet:
>                  ui.write("%s\n" % name)
>              else:
>                  ui.write("%s = %s\n" % (name, util.hidepassword(path)))
> + at command('^phase',
> +    [('p', 'public', False, _('Set changeset to public')),
> +     ('d', 'draft', False, _('Set changeset to draft')),
> +     ('s', 'secret', False, _('Set changeset to secret')),
> +     ('f', 'force', False, _('allow to move boundary backward')),
> +     ('r', 'rev', [], _('target revision')),
> +    ],
> +    _('[-p|-d|-s] [-f] [-C] [-r] REV'))
> +def phase(ui, repo, *revs, **opts):
> +    """set or show the current phase name
> +
> +    See :hg:`help phases` for more information about phases if you are
> +    not familliar with this concept.

Ok, I've finally given up and queued this without the reference to the
missing page like I've been asking for. It is soooo much simpler this
way. I've also made a few follow-up changes that I'll push shortly.

It'll probably take a few days of bikeshedding before your topic patch
is ready, given that it has typos in the first line.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list