What is hg syntax for: is commit A “reachable” from commit B

给你一囗甜甜゛ 提交于 2019-12-12 10:39:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!