About smart server on win32
John Arbash Meinel
john at arbash-meinel.com
Sat Mar 3 14:55:39 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> Andrew,
>
> I try to understand how the best to fix smart server/client internals
> to make selftest pass. From the blackbox tests it seems that
> in some point your smart transport use text mode of file
> to transmit status code and other information. And this is
> cause errors on win32, because on win32 line-endings in text mode
> is CRLF instead of LF on linux (see tracebacks from selftest below).
>
> Because your smart transport is a sort of black magic for me
> I need to know: where the best place to fix this problem:
> in _translate_error or in some internal point change text mode
> to binary mode?
>
I think the smart server should always communicate in binary mode. And
the specific problem is probably:
if inet:
server = smart.SmartServerPipeStreamMedium(sys.stdin, sys.stdout, t)
Because in this case sys.stdin and sys.stdout are opened in text mode.
So a first step is to use the setmode() on both stdin and stdout.
That should help all of the blackbox tests that are calling spawning bzr
serve --inet.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF6YxrJdeBCYSNAAMRAuiEAJ9n6QYBp2uxeT9rVNsABZ5KpniqAQCgtZBn
j3Tp0w+JpNy1uHaPtp08KEI=
=jAkt
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list