Comment 9 for bug 40412

Revision history for this message
John A Meinel (jameinel) wrote : Re: show-base for weave merge

So I've been trying to sort out what would be a reasonable BASE for weave merge. This is not so much --weave --show-base as much as it is dumping a .BASE file that can be used. I think I have a decent idea for one method that could be used for this.

I tried it on a trivial ancestry, and it seemed to do quite well (it picked the lines for BASE that I thought it should based on how I did the merges.)

The basic work is to reprocess the "merge plan" and note which lines should be considered part of "BASE", and output those into the .BASE file.

As such, it turns out I can do this as a post-processing step on a .plan file, so I've implemented it as such. I'd like to get some feedback as to whether the result seems reasonable before I go ahead and change the bzr internals to write out one of these files.

So the basic process is to do:

bzr merge --weave -Dmerge

and then for any '.plan' file, you can run the attached plan_to_base.py script.

  plan_to_base.py *.plan

That should output a bunch of .BASE files which you can try to use.

I'll go ahead and look into what it would take to always do this processing, so as to dump a .BASE file as a standard result of "bzr merge --weave".

However, this gives you something that you can run today with an unmodified bzr, and I can get some feedback as to whether this works well enough to proceed.