[MERGE] Bugfix #55276: on win32 cat, bundle and diff commands provide binary output without mangling line-endings
Alexander Belchenko
bialix at ukr.net
Thu Dec 14 10:12:52 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley пишет:
> Alexander Belchenko wrote:
>> Attached patch provide blackbox tests that illustrate problem
>> and fix for cat, bundle and diff command.
>
>> Fix made by providing new attribute of Command object: binary_stdout.
>> When this attribute is True self.outf object forced to be binary
>> stream instead of text one (by default). Because some tests
>> use StringIO file-like object instead of real sys.stdout
>> so I need to explicitly check for presence of fileno attribute.
>
> It seems like exact should imply binary_stdout. At least, my
> understanding was that 'exact' means you're writing bytes, not
> characters, to self.outf. So you wouldn't actually need a binary_stdout
> flag.
>
> Can anyone think of a counterexample, or point out a flaw in my
> understanding?
Actually only diff command has encoding_type = 'exact',
both cat and bundle commands use 'strict'.
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFgSOkzYr338mxwCURAkHeAJ0dRtRyrxaQeNVjGb75eRUXTp6voACfWU8J
z8/byMQJk9hCQye6mvUHG4U=
=r7W0
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list