[PATCH] Use merge3 for text merging

Aaron Bentley aaron.bentley at utoronto.ca
Tue Jul 26 18:58:04 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC5nmr0F+nu1YWqI0RAvygAJ0Wl9NazKh5N2lk7N9qW7vRzMKpVgCeMcL1
iJM+SNs5tofMoN3gWys0tSY=
=2icS
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: merge3.patch
Type: text/x-patch
Size: 5596 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050726/caafe25d/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: merge_factory.patch
Type: text/x-patch
Size: 5930 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050726/caafe25d/attachment-0001.bin 


More information about the bazaar mailing list