hg语法的作用是:提交A“可到达".从提交B [英] What is hg syntax for: is commit A "reachable" from commit B

查看:80
本文介绍了hg语法的作用是:提交A“可到达".从提交B的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的存储库的历史非常复杂.我经常发现自己想知道过去的某个提交是否在某个修订中(通常是我的脑海),或者可以从某个修订中获取".

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)

我该怎么做?

推荐答案

您可以使用 revsets语法.假设您要询问修订版4是否相对于修订版9是可访问的".

You can use the revsets syntax. Suppose you want to ask if revision 4 is "reachable" from revision 9.

只需执行以下操作:

hg log -r "descendants(4) and 9"

如果可以访问,您将看到修订版9的日志消息.如果无法访问,则将没有输出.

if it is reachable, you will see the log message for revision 9. If it is not, there will be no output.

这篇关于hg语法的作用是:提交A“可到达".从提交B的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆