##// END OF EJS Templates
children: declare command using decorator
Gregory Szorc -
r21248:48e859e3 default
parent child Browse files
Show More
@@ -18,8 +18,15 b' from mercurial import cmdutil, commands'
18 18 from mercurial.commands import templateopts
19 19 from mercurial.i18n import _
20 20
21 cmdtable = {}
22 command = cmdutil.command(cmdtable)
21 23 testedwith = 'internal'
22 24
25 @command('children',
26 [('r', 'rev', '',
27 _('show children of the specified revision'), _('REV')),
28 ] + templateopts,
29 _('hg children [-r REV] [FILE]'))
23 30 def children(ui, repo, file_=None, **opts):
24 31 """show the children of the given or working directory revision
25 32
@@ -40,13 +47,4 b' def children(ui, repo, file_=None, **opt'
40 47 displayer.show(cctx)
41 48 displayer.close()
42 49
43 cmdtable = {
44 "children":
45 (children,
46 [('r', 'rev', '',
47 _('show children of the specified revision'), _('REV')),
48 ] + templateopts,
49 _('hg children [-r REV] [FILE]')),
50 }
51
52 50 commands.inferrepo += " children"
General Comments 0
You need to be logged in to leave comments. Login now