It might be best to draw this out:
default -----A-----o-----o---->
\
Branch_A -----o-----o----->
\
Branch_B -----o-----o-----o---->
\
Master -----o---->
Revision A is the “interesting” one here, as it’s the most recent changeset in default to have been propagated into Master. How do I query Mercurial to get this result?
(As I was typing up this question, a co-worker put together the answer. I’ll post anyway for anyone else using the Googles.)
hg log -r "max(ancestors(master) and branch(default))"This will return the most recent node in branch
defaultthat can trace a path into themasterbranch.