Git have merge-base command that show common ancestors of two or more branches.
What analog for Mercurial and bzr?
For Bazaar:
bzr find-merge-base /path/to/branch1 /path/to/branch2
(This command is hidden from the main set of commands that you can obtain with bzr help commands
. Use bzr help hidden-commands
to see other hidden commands).
For Mercurial:
hg debugancestor rev1 rev2