15

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.

Ken
  • 151
  • 3

1 Answers1

19

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.

Wim Coenen
  • 66,094
  • 13
  • 157
  • 251
  • This is the only correct way, "a:b" or "a::b" which are often given as an answer do not work reliably. Short form is: "::b-::a". @Ken: Can you accept this as answer? – jmuc May 06 '15 at 08:01