对于Bazaar:
bzr find-merge-base /path/to/branch1 /path/to/branch2
Run Code Online (Sandbox Code Playgroud)
(此命令对于您可以获取的主要命令集是隐藏的bzr help commands
.bzr help hidden-commands
用于查看其他隐藏命令).
对于Mercurial:
hg debugancestor rev1 rev2
使用revsets:
"ancestor(single, single)"
Greatest common ancestor of the two changesets.
$ hg log -r 'ancestor(rev1, rev2)'
Run Code Online (Sandbox Code Playgroud)