[PATCH] Use merge3 for text merging

Aaron Bentley aaron.bentley at utoronto.ca
Tue Jul 26 19:28:01 BST 2005


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

Martin Pool wrote:
> I think merge3 should change to avoid the need for the ugly hack.  It
> can do either of two things:
> 
> - just simply tell the caller whether there were conflicts or not
> 
> - rather than inserting the conflict markers itself (which is a bit
>   ugly) instead return a data structure describing conflicted and
>   unconflicted regions
> 
> I as going to do the second but piked until it was needed.  Whch do
> you want?

To my mind, the first is easier to implement, and it's what most clients
will want.  So I'd wait until I needed it, or els supply a convenience
function.  A convenience function could take a file-like object as an
argument and return number of conflicts encountered.

But ApplyMerge3 is an adaptor anyway, and it wouldn't be hard to make
handle conflicts the second way.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC5oCx0F+nu1YWqI0RAjxRAJ9u//072yGhO2lvCLOigqu6LC7eYQCff4rl
ovAIp1FmDsJWRT3Qq0jEy6E=
=frL3
-----END PGP SIGNATURE-----




More information about the bazaar mailing list