Analogue of merge-base for Mercurial and bzr (to find common ancestors as possible for merging)?

Git is a merge command that shows the common ancestors of two or more branches.

What is the analogue for Mercurial and bzr?

+7
source share
3 answers

Use revsets :

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

For the bazaar:

 bzr find-merge-base /path/to/branch1 /path/to/branch2 

(This command is hidden from the main set of commands that you can get with bzr help commands . Use bzr help hidden-commands to view other hidden commands).

+8
source

For Mercurial:

hg debugancestor rev1 rev2

+5
source

All Articles