changeset 24792 | 7d0421de8de3 |
parent 24784 | 59406b8b1303 |
child 24798 | 9fbf0a2a72a1 |
--- a/mercurial/localrepo.py Thu Apr 16 05:41:07 2015 -0400 +++ b/mercurial/localrepo.py Thu Apr 16 05:36:49 2015 -0400 @@ -975,6 +975,12 @@ **tr2.hookargs) reporef()._afterlock(hook) tr.addfinalize('txnclose-hook', txnclosehook) + def txnaborthook(tr2): + """To be run if transaction is aborted + """ + reporef().hook('txnabort', throw=False, txnname=desc, + **tr2.hookargs) + tr.addabort('txnabort-hook', txnaborthook) self._transref = weakref.ref(tr) return tr