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?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With