Mercurial provides the command parents to examine a given revision's parent(s). This can easily be used to Traverse the DAG backward. I need to traverse the DAG forward. Is there a hg children
command?
views:
41answers:
2
+5
A:
If you're using Mercurial 1.6 or later, there is a built-in functional language for specifying sets of revisions; see hg help revsets
for full details.
In your case, you would use hg log -r children(XXX)
to show immediate children of revision XXX
, or hg log -r descendants(XXX)
to show all changesets with XXX
as an ancestor.
Niall C.
2010-10-19 19:37:14
A:
Use the bundled children
extension. hg help children
(1.5):
hg children [-r REV] [FILE]
show the children of the given or working directory revision
Print the children of the working directory's revisions. If a revision is
given via -r/--rev, the children of that revision will be printed. If a
file argument is given, revision in which the file was last changed (after
the working directory revision or the argument to --rev if given) is
printed.
options:
-r --rev show children of the specified revision
--style display using template map file
--template display with template
Geoffrey Zheng
2010-10-21 02:14:29