如何在 mercurial 中查找 parents 中的特定变更集

How to find if specific changeset within the parents in mercurial

我是 git 背景,刚转到一个使用 mercurial 的项目,该项目使用 heads 模型进行分支。

在将内容推送到我们的测试服务器之前,我想确保生产主管是我的 parents 列表之一。有相关命令吗?

实际上我找到了一种使用 mercurial "revsets" 的方法。

为了列出特定变更集的所有祖先,我们可以使用命令

hg log -r "ancestors(84e5bc6fd673)"

现在为了在这些parents中找到特定的变更集,我们可以使用如下匹配函数

hg log -r "ancestors(84e5bc6fd673) and id(hh6cjb9c48se)"

所以如果 hh6cjb9c48se 是 84e5bc6fd673 的一部分 parents 它将被打印到终端。