0

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?

moswald
  • 11,491
  • 7
  • 52
  • 78

1 Answers1

1

(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 default that can trace a path into the master branch.

moswald
  • 11,491
  • 7
  • 52
  • 78