Having two branches, how can I find the latest revision(s) where the two branches were merged? Is there a standard Mercurial command to do that?
This is the same as question How to find the common ancestor of two branches in SVN?, but for Mercurial instead of subversion.
I didn't understand why Lazy Badger's answer was the right one, so I had to make a little drawing, and now I get it:
When two branches are merged, they are not really "merged", but the changes from one branch are integrated into a second branch. This means that the merge commit only belongs to the originating branch, and not to the merged branch. This is why the merge revision is one of the two children of the ancestor revision.
This is probably best seen with a picture:
default o----o----a---b---o---o
\ \
other `-o---o---m---o
ancestor(default,other) == a
children(ancestor(default,other)) == (b,m)
children(ancestor(default,other)) and merge() == m