[PLUGIN] Alternative merge pulls history, and finds best base.

Martin Pool mbp at sourcefrog.net
Tue Jul 5 07:12:43 BST 2005


On  5 Jul 2005, Robert Collins <robertc at robertcollins.net> wrote:


> I think that a much better approach is per-file graph searches - for
> each file that has a different last-modifying revision between the two
> trees, decide on a base using a similar algorithm. This will give much
> better results because two files that may provide mutually exclusive
> 'best' results can both be satisfied.

I agree.

My weave code identifies versions of a particular file by the tree
revision-id in which they were first introduced, and also records the
ancestors of each text version.  So the history of each file knows an
abreviated form of the whole-tree history graph relevant to that file.
This can be used to choose a previous version as a merge base, or to
build a composite text that gives a better merge basis that is better
than any single text.  I think this gives similar results to cdv-merge.

This doesn't constrain the storage format to be what my current weave
code produces.  It could be append-only transform or something like
Johan's(?) annotated-revfile, or whatever.

-- 
Martin




More information about the bazaar mailing list