patch versus 3-way merge for moved contents

Martin Pool martinpool at gmail.com
Fri Oct 28 02:28:54 BST 2005


On 28/10/05, John A Meinel <john at arbash-meinel.com> wrote:
> Sometimes, one of the advantages of patch is that it uses a local
> context to determine where the patch should be applied.

Yes, it might well do better in some cases.  Wiggle might be better again.

I suppose people won't know ahead of time whether it will be better or
not.  If the 3-way merge is bad, people could invoke diff/patch by
hand using the BASE/OTHER/THIS files, but it might be nice if it was
more automatic.

It might be good if there were a command something like

  bzr remerge --merge-type=patch hello.c

that looked up the correct parents and did the merge again.

We could have the automatic merge try a patch if it gets conflicts on
the 3-way merge, but that probably depends on having a reliable way to
detect which one is better.

--
Martin




More information about the bazaar mailing list