[MERGE] Bugfix #55276: on win32 cat, bundle and diff commands provide binary output without mangling line-endings

Alexander Belchenko bialix at ukr.net
Mon Dec 18 09:10:09 GMT 2006


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

Aaron Bentley пишет:
> Alexander Belchenko wrote:
>> Alexander Belchenko ?8H5B:
> 
>>>> Actually only diff command has encoding_type = 'exact',
>>>> both cat and bundle commands use 'strict'.
>> After inspecting attributes of all built-ins non-hidden command
>> I see that only 2 commands have exact encoding type: diff and version-info.
> 
> bundle and cat should both be exact.  They both emit bytes, not
> characters.  So strict is wrong; output must not be treated as
> characters and re-encoded.
> 
> With bundles, the metadata is utf-8 encoded, and the diffs are in
> whatever encoding each file is in.

Actually diff is a mess: chunks is bytestreams, and filenames is utf-8 encoded.
It's a bad (for win32) but discussion in past go to deadlock.

> 
> Cat's purpose is to output a file, so again, it's bytes.
> 
>> I don't think that parsing output of version-info will be difficult
>> with CRLF line-endings, so I think this command don't require binary
>> stdout on win32.
> 
> I'm surprised it's exact, but maybe the reason was so that when you
> include its output in a file, you get the same result on every platform.

I don't know why, it's John's eparchy.

OK. I understand your point clear enough.
I just want to be sure that in future 'exact' always means that
output should be binary stream.


Alexander

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhlrxzYr338mxwCURAlTMAJ9x30jy2nOQh1x6iYi85iA0nwaxXwCfZg9K
vG2qCDvga1YaxyyYxpJygKk=
=cGCt
-----END PGP SIGNATURE-----





More information about the bazaar mailing list