问题
The history of my repository is very complex. I often find myself wanting to know if a certain commit from the past "is in" or "is reachable from" a certain revision (usually one of my heads)
How do I do this?
回答1:
You can use the revsets syntax. Suppose you want to ask if revision 4 is "reachable" from revision 9.
Simply do this:
hg log -r "descendants(4) and 9"
if it is reachable, you will see the log message for revision 9. If it is not, there will be no output.
来源:https://stackoverflow.com/questions/9349304/what-is-hg-syntax-for-is-commit-a-reachable-from-commit-b