Support for Unicode files

Aaron Bentley aaron.bentley at utoronto.ca
Wed May 23 14:52:42 BST 2007


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

Dennis Benzinger wrote:
> Am Wed, 23 May 2007 11:19:25 +0200
> schrieb John Arbash Meinel <john at arbash-meinel.com>:
> 
> I think that's a good way to handle this problem. There should be a
> mime-type property for each file (like in Subversion) and a merge
> plugin registry where plugins for different MIME types can register and
> depending on the MIME type of the file to merge the suitable plugin is
> used.

That sounds reasonable.  Note that there is already a registry of merge
types, but it's one that doesn't presuppose three-way merging-- the
current supported types are merge3, diff3 and weave.

> MIME types for which no plugin is registered are treated as
> unmergeable.

That doesn't sound okay.  We should attempt merging on all text files,
but we can't predict what MIME types may be used.

>> A bigger question, though. What to do if you are merging a file which 
>> claims it is UTF-16 against a file which claims it is UTF-8? 
>> [...]
> 
> Refuse to merge.

We would typically handle that as a contents conflict.  foo.BASE,
foo.THIS and foo.OTHER would be dumped in the working tree, and the user
can sort it out for themself.

But I should point out that two files may have the same MIME type yet be
in different encodings.

>> I still feel like we shouldn't to transcoding on the fly (including 
>> line-endings).

I'm fine with people setting it up for themselves via a registry.

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

iD8DBQFGVEcq0F+nu1YWqI0RAuksAJ40IvItHiE90UwK4nJ5kAi0rIAJIgCeOXC8
TJ1J1SA3I0Bi+XRB1INDEUg=
=qPzK
-----END PGP SIGNATURE-----



More information about the bazaar mailing list