[MERGE][#297014] Add a flag to suppress errors from abort_write_group
Martin Pool
mbp at canonical.com
Wed Nov 12 04:27:44 GMT 2008
Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
@@ -521,7 +522,15 @@
if self._write_group is not self.get_transaction():
# has an unlock or relock occured ?
raise errors.BzrError('mismatched lock context and write
group.')
- self._abort_write_group()
+ try:
+ self._abort_write_group()
+ except Exception, exc:
+ self._write_group = None
+ if not suppress_errors:
+ raise
+ mutter('abort_write_group failed')
+ log_exception_quietly()
+ note('bzr: ERROR (ignored): %s', exc)
self._write_group = None
def _abort_write_group(self):
Maybe we should log, and arguably even print, the error in every case,
even if we're going to re-raise it.
Also I'd like know that this has been tested interactively, eg by doing
a push over ssh and killing the ssh subprocess.
For details, see:
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C20081112041247.GA29558%40steerpike.home.puzzling.org%3E
Project: Bazaar
More information about the bazaar
mailing list