gavenkoa
gavenkoa

Reputation: 48873

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?

Upvotes: 10

Views: 872

Answers (3)

bialix
bialix

Reputation: 21473

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).

Upvotes: 9

Idan K
Idan K

Reputation: 20881

Use revsets:

"ancestor(single, single)"
      Greatest common ancestor of the two changesets.

$ hg log -r 'ancestor(rev1, rev2)'

Upvotes: 9

Peter Graham
Peter Graham

Reputation: 11701

For Mercurial:

hg debugancestor rev1 rev2

Upvotes: 6

Related Questions