Mercurial > hgsubversion
changeset 906:757d6a862c83
subvertpy bindings: abort transaction if we can't finalize it
This should prevent us from leaking pending transactions on the
server.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 17 May 2012 09:06:49 -0500 |
parents | 04ded06ea517 |
children | 173065f9b715 |
files | hgsubversion/svnwrap/subvertpy_wrapper.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/svnwrap/subvertpy_wrapper.py +++ b/hgsubversion/svnwrap/subvertpy_wrapper.py @@ -411,10 +411,14 @@ class SubversionRepo(object): return pathidx - rooteditor = commiteditor.open_root() - visitdir(rooteditor, '', paths, 0) - rooteditor.close() - commiteditor.close() + try: + rooteditor = commiteditor.open_root() + visitdir(rooteditor, '', paths, 0) + rooteditor.close() + commiteditor.close() + except: + commiteditor.abort() + raise def get_replay(self, revision, editor, oldestrev=0):