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 ques
hg log -r "last(ancestors(target) & branch(source))"
This gives you the least common ancestor of target and source branch ON source branch.
source o---a---o---m2---o
\ /
intermediate o--o--m1---b---o
\
target o---o------------m3---o
The least common ancestor of source and target branch in this example would be b, but b is not on the source branch, we therefore want to get a back.
To get b back you can use the solution of Lasse:
hg log -r "ancestor(source, target)"
I often want to know the latest "default" revision in some task branch and I don't care if my task branch was directly merged with default or via some intermediate path.