How to compare sets of changesets between 2 Mercurial branches?

天大地大妈咪最大 提交于 2019-12-18 12:17:18

问题


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).

Is there an easy way to do this with just hg?

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.


回答1:


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)"

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.



来源:https://stackoverflow.com/questions/4522974/how-to-compare-sets-of-changesets-between-2-mercurial-branches

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