[PATCH] Use merge3 for text merging

John A Meinel john at arbash-meinel.com
Tue Jul 26 19:07:27 BST 2005


Aaron Bentley wrote:
> These patches implement
> 1. the merge_factory concept, so that different merge approaches can be used
> 2. the Merge3 merge, used by default
> 
> In the future I can imagine supporting:
> - merge-with-backup (so we can unify merge-revert and revert's
> functionality)
> - exact-merge (insist that BASE's entire contents must be either THIS or
> OTHER, for revert, which should never have conflicts)
> - merge-by-diffpatch (use patch and diff to merge a file's contents)
> (some people prefer .rej conflicts).
> - merge-by-wiggle
> - xmlmerge
> etc, etc.
> 
> The ugly hack
> 
> I needed a way to determine whether the merge produced conflicts.  I
> didn't want just scan for '<<<<<<<' because that might already be
> present in the original file-- i.e. not an indicator of a *new*
> conflict.  So I set the start marker to an unlikely string, and replaced
> it with '<<<<<<' when I encountered it.  It's unlikely to cause
> real-world problems, but I'd rather be able to directly determine
> whether any conflicts ocurred.
> 
> Aaron

Well, I would say probably Merge3 should just have a status indicator to 
let you know if there were any conflicts (probably something like number 
of conflicts)

Secondly, the merge_types dictionary should probably be a module-level 
dictionary, to allow plugins to define new merge types. I don't believe 
it is possible to add new entries into a local dictionary.

But generally, it's good to see Merge3 get used.

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050726/48a1b7c5/attachment.pgp 


More information about the bazaar mailing list