equal
deleted
inserted
replaced
12 |
12 |
13 This extension is deprecated. You should use :hg:`log -r |
13 This extension is deprecated. You should use :hg:`log -r |
14 "children(REV)"` instead. |
14 "children(REV)"` instead. |
15 ''' |
15 ''' |
16 |
16 |
17 from mercurial import cmdutil, commands |
17 from mercurial import cmdutil |
18 from mercurial.commands import templateopts |
18 from mercurial.commands import templateopts |
19 from mercurial.i18n import _ |
19 from mercurial.i18n import _ |
20 |
20 |
21 cmdtable = {} |
21 cmdtable = {} |
22 command = cmdutil.command(cmdtable) |
22 command = cmdutil.command(cmdtable) |
24 |
24 |
25 @command('children', |
25 @command('children', |
26 [('r', 'rev', '', |
26 [('r', 'rev', '', |
27 _('show children of the specified revision'), _('REV')), |
27 _('show children of the specified revision'), _('REV')), |
28 ] + templateopts, |
28 ] + templateopts, |
29 _('hg children [-r REV] [FILE]')) |
29 _('hg children [-r REV] [FILE]'), |
|
30 inferrepo=True) |
30 def children(ui, repo, file_=None, **opts): |
31 def children(ui, repo, file_=None, **opts): |
31 """show the children of the given or working directory revision |
32 """show the children of the given or working directory revision |
32 |
33 |
33 Print the children of the working directory's revisions. If a |
34 Print the children of the working directory's revisions. If a |
34 revision is given via -r/--rev, the children of that revision will |
35 revision is given via -r/--rev, the children of that revision will |
44 |
45 |
45 displayer = cmdutil.show_changeset(ui, repo, opts) |
46 displayer = cmdutil.show_changeset(ui, repo, opts) |
46 for cctx in ctx.children(): |
47 for cctx in ctx.children(): |
47 displayer.show(cctx) |
48 displayer.show(cctx) |
48 displayer.close() |
49 displayer.close() |
49 |
|
50 commands.inferrepo += " children" |
|