Search code examples
gitmercurialmergebazaar

merge-base analog for Mercurial and bzr (to find common ancestors as possible for a merge)?


Git have merge-base command that show common ancestors of two or more branches.

What analog for Mercurial and bzr?


Solution

  • Use revsets:

    "ancestor(single, single)"
          Greatest common ancestor of the two changesets.
    
    $ hg log -r 'ancestor(rev1, rev2)'