hgext/children.py
changeset 21248 48e859e30cbf
parent 17773 434e5bd615fc
child 21780 2d3fb8476d7a
--- a/hgext/children.py	Sun May 04 21:48:41 2014 -0700
+++ b/hgext/children.py	Sun May 04 21:46:49 2014 -0700
@@ -18,8 +18,15 @@
 from mercurial.commands import templateopts
 from mercurial.i18n import _
 
+cmdtable = {}
+command = cmdutil.command(cmdtable)
 testedwith = 'internal'
 
+@command('children',
+    [('r', 'rev', '',
+     _('show children of the specified revision'), _('REV')),
+    ] + templateopts,
+    _('hg children [-r REV] [FILE]'))
 def children(ui, repo, file_=None, **opts):
     """show the children of the given or working directory revision
 
@@ -40,13 +47,4 @@
         displayer.show(cctx)
     displayer.close()
 
-cmdtable = {
-    "children":
-        (children,
-         [('r', 'rev', '',
-           _('show children of the specified revision'), _('REV')),
-         ] + templateopts,
-         _('hg children [-r REV] [FILE]')),
-}
-
 commands.inferrepo += " children"