[PATCH] histedit: use cmdutil.command decorator
Augie Fackler
raf at durin42.com
Fri Jul 6 15:58:22 CDT 2012
LGTM
On Jul 6, 2012, at 4:49 PM, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1341607390 -7200
> # Node ID 22c1c58e615df6d1efd6aa48bce8214c0b75afb7
> # Parent 01d847e0fdc9578ae2f94b42291bcb6a6e5bf89e
> histedit: use cmdutil.command decorator
>
> diff --git a/hgext/histedit.py b/hgext/histedit.py
> --- a/hgext/histedit.py
> +++ b/hgext/histedit.py
> @@ -27,6 +27,9 @@
> from mercurial import util
> from mercurial.i18n import _
>
> +cmdtable = {}
> +command = cmdutil.command(cmdtable)
> +
> testedwith = 'internal'
>
> editcomment = """
> @@ -242,6 +245,19 @@
> 'm': message,
> 'mess': message,
> }
> +
> + at command('histedit',
> + [('', 'commands', '',
> + _('Read history edits from the specified file.')),
> + ('c', 'continue', False, _('continue an edit already in progress')),
> + ('k', 'keep', False,
> + _("don't strip old nodes after edit is complete")),
> + ('', 'abort', False, _('abort an edit in progress')),
> + ('o', 'outgoing', False, _('changesets not found in destination')),
> + ('f', 'force', False,
> + _('force outgoing even for unrelated repositories')),
> + ('r', 'rev', [], _('first revision to be edited'))],
> + __doc__)
> def histedit(ui, repo, *parent, **opts):
> """hg histedit <parent>
> """
> @@ -543,22 +559,3 @@
> raise util.Abort(_('unknown action "%s"') % action)
> parsed.append([action, ha])
> return parsed
> -
> -
> -cmdtable = {
> - "histedit":
> - (histedit,
> - [('', 'commands', '', _(
> - 'Read history edits from the specified file.')),
> - ('c', 'continue', False, _('continue an edit already in progress')),
> - ('k', 'keep', False, _(
> - "don't strip old nodes after edit is complete")),
> - ('', 'abort', False, _('abort an edit in progress')),
> - ('o', 'outgoing', False, _('changesets not found in destination')),
> - ('f', 'force', False, _(
> - 'force outgoing even for unrelated repositories')),
> - ('r', 'rev', [], _('first revision to be edited')),
> - ],
> - __doc__,
> - ),
> -}
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list