hgext/histedit.py
changeset 17147 80e861511e2b
parent 17131 4fb2d3d16743
child 17191 5884812686f7
--- 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]"),
-         ),
-}