如何比较两个Mercurial分支之间的变更集集? [英] How to compare sets of changesets between 2 Mercurial branches?
问题描述
我有一个(远程)汞存储库,其中有几个分支.我想验证分支A是否具有分支B的所有变更集(它可能有更多变更,这没关系).
I've got a (remote) Hg repository with a couple branches. I want to verify that branch A has every changeset that branch B has (it may have more, and that's OK).
仅用hg
有一种简单的方法吗?
Is there an easy way to do this with just hg
?
我可以编写一个小的shell脚本来完成此操作,但似乎可能会发生很多事情,所以也许有一种简单的内置方法.
I can write a little shell script to do it, but it seems like the sort of thing that might come up a lot, so maybe there's an easy built-in way.
推荐答案
这将显示所有变更集b
的祖先,而不是变更集a
的祖先:
This will show any ancestors of changeset b
which are not an ancestor of changeset a
:
hg log -r "ancestors(b) and not ancestors(a)"
如果您将分支B的首部指定为b,将分支B的首部指定为a,则应该向您显示哪些更改仍需要从B合并到A.
This should show you which changes still need to be merged from B to A if you give the head of branch B for b, and the head of branch A for a.
这篇关于如何比较两个Mercurial分支之间的变更集集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!