views:

235

answers:

1

I work in an environment with large scale multi-parallel branching. Looking at GIT I see it has several merge strategies:

already up-to-date
fast-forward
octopus
resolve
recursive

Does Mercurial have the equivalent of each of these? (ie is the implementation of Mercurial's merge algorithm as good as recursive?

+4  A: 
  • already up-to-date
  • fast-forward

Those aren't merge strategies, I guess the first one is when there's nothing to merge (obviously supported). The second isn't a merge, updating in hg is equivalent to fast-forward (there's nothing to merge).

  • octopus

Doesn't apply to mercurial, merges are always between two heads.

  • resolve

That's the default merge strategies.

  • recursive

Could probably be done with a custom merge script (hg, like git just call external tools to handle the merge). But nobody seemed interested in it for now, maybe because it doesn't bring a lot of improvements compared to resolve.

tonfa
"fast-forward" is not rebase: is actually the opposite of "up-to-date", in a sense that current branch is ancestor of merged branch. By default (i.e. no `--no-ff` option) Git just advances branch head instead of performing pointless merge.
Jakub Narębski
"recursive" merge strategy was designed to deal with criss-cross merges and other situations with more than one merge base.... and with renames in such situation.
Jakub Narębski
@Jakub, thanks I updated the part about fast-forward. So it's just "update" in mercurial.does the recursive strategy make a difference in practice?
tonfa