mercurial/localrepo.py
changeset 24792 7d0421de8de3
parent 24784 59406b8b1303
child 24798 9fbf0a2a72a1
equal deleted inserted replaced
24791:89c5881d692c 24792:7d0421de8de3
   973             def hook():
   973             def hook():
   974                 reporef().hook('txnclose', throw=False, txnname=desc,
   974                 reporef().hook('txnclose', throw=False, txnname=desc,
   975                                **tr2.hookargs)
   975                                **tr2.hookargs)
   976             reporef()._afterlock(hook)
   976             reporef()._afterlock(hook)
   977         tr.addfinalize('txnclose-hook', txnclosehook)
   977         tr.addfinalize('txnclose-hook', txnclosehook)
       
   978         def txnaborthook(tr2):
       
   979             """To be run if transaction is aborted
       
   980             """
       
   981             reporef().hook('txnabort', throw=False, txnname=desc,
       
   982                            **tr2.hookargs)
       
   983         tr.addabort('txnabort-hook', txnaborthook)
   978         self._transref = weakref.ref(tr)
   984         self._transref = weakref.ref(tr)
   979         return tr
   985         return tr
   980 
   986 
   981     def _journalfiles(self):
   987     def _journalfiles(self):
   982         return ((self.svfs, 'journal'),
   988         return ((self.svfs, 'journal'),