[merge] catching EPIPE (especially on win32)

Martin Pool mbp at canonical.com
Thu Jun 29 05:21:12 BST 2006


On 29/06/2006, at 1:39 PM, Aaron Bentley wrote:

> John Arbash Meinel wrote:
>> This isn't how CVS works. If you ^C in the middle, you get:
>> cvs [log aborted]: received interrupt signal
>>
>> I think it is fine for bzr to print
>> bzr: interrupted
>
> The original purpose of the display_command decorator was to swallow
> KeyboardInterrupt.

I thought it was to swallow EPIPE - these are commands that are  
typically run through less.

I agree that we should just let KeyboardInterrupt propagate.  What we  
do at the moment has the drawback that if you try to interrupt the  
test suite this will sometimes swallow the interrupt.

> Perhaps we should rethrow it as SilentKeyboardInterrupt or
> PrettyKeyboardInterrupt, but the default handling of KeyboardInterrupt
> is dead ugly, and I don't think we want to use that.

The default Python one is but we override it in run_bzr_catch_errors  
and trace.py

> I think that it does not make sense to print error messages when  
> there's
> no error, that it looks nicer if we don't.  Also, the fewer error
> messages we emit, the more people will pay attention when we do  
> emit one.

I think it's OK to give one line when we're interrupted.  It's not  
intrusive and it can sometimes be useful.

+1 from me for John's patch.

-- 
Martin







More information about the bazaar mailing list