Mercurial > hg-stable
changeset 17147:80e861511e2b
histedit: use cmdutil.command decorator
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 06 Jul 2012 22:43:10 +0200 |
parents | 6b40cc67ceb4 |
children | 4b33422e2572 |
files | hgext/histedit.py |
diffstat | 1 files changed, 16 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Tue Jul 10 17:52:43 2012 +0200 +++ b/hgext/histedit.py Fri Jul 06 22:43:10 2012 +0200 @@ -159,6 +159,9 @@ from mercurial import util from mercurial.i18n import _ +cmdtable = {} +command = cmdutil.command(cmdtable) + testedwith = 'internal' editcomment = """ @@ -374,6 +377,19 @@ 'm': message, 'mess': message, } + +@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'))], + _("[PARENT]")) def histedit(ui, repo, *parent, **opts): """interactively edit changeset history """ @@ -677,22 +693,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')), - ], - _("[PARENT]"), - ), -}