[MERGE] Make cmd_branch check the destination before doing any I/O on the source.
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 27 14:18:41 BST 2006
Martin Pool wrote:
> I'm not really convinced this is a sufficient improvement to justify the
> complexity. If the original exception was say a KeyboardInterrupt, and
> we then got an exception indicating a real bug in bzr then it would be
> much worse to raise the first.
> In the case of exceptions during cleanup I think we should probably
> follow what python does for del methods - show a warning and continue.
> except TransportError, e:
> warning("error %s while removing destination", e)
> (perhaps display of the exception should be lifted to a
> Arguably that should catch and warn about everything rather than just
> TransportError, but I think making it specific is fine.
I think we still need to do:
info = sys.exc_info()
except TransportError, e:
The problem with your bare raise is at that point the last exception
could be the TransportError.
But otherwise, I'm okay with it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060727/1a735cd4/attachment.pgp
More information about the bazaar