Merge algorithms

Eli Zaretskii eliz at gnu.org
Thu Sep 16 21:00:09 BST 2010


Thank you for very informative responses.

My interest in the non-default merge algorithms was triggered by the
annoyance known as ChangeLog.  Merging one branch with another will
almost always produce text conflicts in the ChangeLog files, if both
branches are actively developed.

The Right Thing for the merge in this case is very simple: put the
lines that are new on the source branch at the beginning of the
ChangeLog file, i.e. _before_ all the lines that are new on the target
branch.  (The "source" branch is the one _from_ which you merge, and
the "target" is the one _onto_ which you merge.)

The question is, will any of the non-default merge algorithms do this
without declaring a conflict?  If not, would it be reasonable to ask
for a feature like that to be part of "bzr merge"?

The alternative is currently to use "bzr extmerge" and install
git-merge-changelog (from gnulib).  But it's a pain to build
git-merge-changelog on Windows, and it's a nuisance to have to use a
different command for ChangeLog files.  It would be better to have bzr
DTRT automagically.

My questions about performance was because if there is an alternative
algorithm that can handle ChangeLog merges, I might consider making it
the default, unless it is too slow.

Thanks.



More information about the bazaar mailing list