[merge] Fix trailing whitespace bug #49182

Robey Pointer robey at lag.net
Fri Jun 23 04:12:45 BST 2006


On 22 Jun 2006, at 17:35, John Arbash Meinel wrote:

> Robey Pointer wrote:
>>
>> On 22 Jun 2006, at 17:21, Robey Pointer wrote:
>>
>>>
>>> On 22 Jun 2006, at 12:50, John Arbash Meinel wrote:
>>>
>>>> Aaron Bentley wrote:
>>>>> John Arbash Meinel wrote:
>>>>>>> I've gotten bit by this several times, and it seems other people
>>>>>>> have as
>>>>>>> well. So I went ahead and wrote this patch which tests bundles
>>>>>>> that have
>>>>>>> their trailing whitespace messed with, and fixes the parser.
>>>>>
>>>>> Great.  +1.
>>>>>
>>>>>>> The selftests pass, though for some reason I'm getting  
>>>>>>> tracebacks
>>>>>>> in the
>>>>>>> SFTP Server threads. 'Broken pipe' mostly. But I'm getting  
>>>>>>> those in
>>>>>>> plain 'bzr.dev', so it shouldn't be anything with my patch.
>>>>>
>>>>> Those seem to have come in with Robey's recent SFTP timeout fix.
>>>>
>>>> Yeah, that's what I guessed. I wouldn't have +1'd it if I had  
>>>> seen that
>>>> happening. It seems that on my FC4 machine, it doesn't happen.  
>>>> But on
>>>> Ubuntu Dapper it does.
>>>
>>> It's happening on my mac now, too.  Turns out it's a bug in paramiko
>>> that's fixed in the trunk but not in a release (yet).  Attached is a
>>> patch against bzr to absorb that exception.  Actually as an  
>>> experiment
>>> I'm going to attach it as a bundle.
>>
>> Err... in my excitement to try out bundles I forgot to remove some
>> debugging from my patch before committing. :)  Here's the right  
>> bundle.
>>
>> robey
>>
>
> Its fairly obvious that you uncommitted did the fix, and then  
> committed
> a new change. If you *really* wanted to test out bundles, you would  
> have
> just made the change, and submitted the rollup bundle.

Does that still compile two individual 'diff -u's?  I didn't want  
that; I wanted the diff to be the final result.


> That said....
> Is it best to use e.args[] for this. Shouldn't the subsystem be  
> raising
> something with an 'e.errno'?

Preaching to the choir, my friend.  I tried 'errno' first, then found  
out that socket.error doesn't add that field.  It uses 'args'  
instead.  Blech.

(This is an exception thrown by the socket library, which paramiko is  
accidentally leaking.)


> In the general sense of having the sftp server swallow broken pipes...
> It seems okay, but why is our client breaking the connection early.
> Isn't it nicer if bzr hangs up properly?

It would be nicer, but that isn't possible without adding an explicit  
"close()" to bzr transports.

robey





More information about the bazaar mailing list