[MERGE] Re: [Bug 115781] Re: traceback on smart server when branching/pulling (win32)

Andrew Bennetts andrew at canonical.com
Wed Dec 19 02:41:27 GMT 2007


Alexander Belchenko wrote:
[...]
>
> As another improvements you could use for loop,
>
>          chunk_size = 2**16
>          for pos in xrange(0, len(bytes), chunk_size):
>              self.socket.sendall(bytes[pos:pos+chunk_size])

I prefer this.  Done.

I also noticed another use of sendall in this module, in the client side.
Perhaps a push of a large pack might trigger the same problem, so I made a
function out of this and put it in osutils.  After all, we already have
osutils.recv_all.

The tweaked version is now with PQM.

-Andrew.




More information about the bazaar mailing list