Code review comment for lp:~jameinel/bzr/2.0-40412-show-base-weave

Revision history for this message
John A Meinel (jameinel) wrote :

This is a fairly small change to the merge code, such that 'bzr merge --weave' and --lca now put a .BASE file on disk along with the .THIS and .OTHER files.

The code is based off of the 2.0 branch, but for now I'm only proposing it for the 2.1 series. Adding a .BASE file on disk is a bit of a 'feature' change. Though not terribly so (given that 'bzr revert' will still clean them up, etc.) The api changes are generally internal functions with loose coupling, so should be ok.

I should also note that I don't have a NEWS entry, because it is based on the 2.0 branch (and thus I don't have a place to put NEWS for the 2.1 series.) I'll add it at merge time.

The basics here are that we walk the 'merge plan' and for each line status, we decide whether that means the content was in a hypothetical BASE. (eg, 'new-a' is newly added in one target, so obviously not in base, 'unchanged' is clearly in BASE, etc.)

In my testing, it gives the same results as a 3-way merge BASE would, except you are likely to use it in cases where 3-way merging doesn't quite cut it.

This code also suffers from:
https://bugs.edge.launchpad.net/bzr/+bug/494197

But I figure, better to land what I've got than try to track down all the edge cases and end up having a huge patch that nobody wants to review. :)

« Back to merge proposal