Show More
@@ -1,49 +1,49 b'' | |||
|
1 | 1 | # Mercurial extension to provide the 'hg children' command |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2007 by Intevation GmbH <intevation@intevation.de> |
|
4 | 4 | # |
|
5 | 5 | # Author(s): |
|
6 | 6 | # Thomas Arendsen Hein <thomas@intevation.de> |
|
7 | 7 | # |
|
8 | 8 | # This software may be used and distributed according to the terms of the |
|
9 | 9 | # GNU General Public License version 2 or any later version. |
|
10 | 10 | |
|
11 | 11 | '''command to display child changesets (DEPRECATED) |
|
12 | 12 | |
|
13 |
This extension is deprecated. You should use |
|
|
14 | instead. | |
|
13 | This extension is deprecated. You should use :hg:`log -r | |
|
14 | "children(REV)"` instead. | |
|
15 | 15 | ''' |
|
16 | 16 | |
|
17 | 17 | from mercurial import cmdutil |
|
18 | 18 | from mercurial.commands import templateopts |
|
19 | 19 | from mercurial.i18n import _ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | def children(ui, repo, file_=None, **opts): |
|
23 | 23 | """show the children of the given or working directory revision |
|
24 | 24 | |
|
25 | 25 | Print the children of the working directory's revisions. If a |
|
26 | 26 | revision is given via -r/--rev, the children of that revision will |
|
27 | 27 | be printed. If a file argument is given, revision in which the |
|
28 | 28 | file was last changed (after the working directory revision or the |
|
29 | 29 | argument to --rev if given) is printed. |
|
30 | 30 | """ |
|
31 | 31 | rev = opts.get('rev') |
|
32 | 32 | if file_: |
|
33 | 33 | ctx = repo.filectx(file_, changeid=rev) |
|
34 | 34 | else: |
|
35 | 35 | ctx = repo[rev] |
|
36 | 36 | |
|
37 | 37 | displayer = cmdutil.show_changeset(ui, repo, opts) |
|
38 | 38 | for cctx in ctx.children(): |
|
39 | 39 | displayer.show(cctx) |
|
40 | 40 | displayer.close() |
|
41 | 41 | |
|
42 | 42 | cmdtable = { |
|
43 | 43 | "children": |
|
44 | 44 | (children, |
|
45 | 45 | [('r', 'rev', '', |
|
46 | 46 | _('show children of the specified revision'), _('REV')), |
|
47 | 47 | ] + templateopts, |
|
48 | 48 | _('hg children [-r REV] [FILE]')), |
|
49 | 49 | } |
General Comments 0
You need to be logged in to leave comments.
Login now