mercurial/exchange.py
changeset 23000 90c425f80316
parent 22972 44b16b59b80a
child 23009 90f86ad3d4ff
equal deleted inserted replaced
22999:88ac1be3f767 23000:90c425f80316
   832         return self._tr
   832         return self._tr
   833 
   833 
   834     def closetransaction(self):
   834     def closetransaction(self):
   835         """close transaction if created"""
   835         """close transaction if created"""
   836         if self._tr is not None:
   836         if self._tr is not None:
       
   837             repo = self.repo
       
   838             cl = repo.unfiltered().changelog
       
   839             p = cl.writepending() and repo.root or ""
       
   840             p = cl.writepending() and repo.root or ""
       
   841             repo.hook('b2x-pretransactionclose', throw=True, pending=p,
       
   842                       **self._tr.hookargs)
   837             self._tr.close()
   843             self._tr.close()
       
   844             repo.hook('b2x-transactionclose', **self._tr.hookargs)
   838 
   845 
   839     def releasetransaction(self):
   846     def releasetransaction(self):
   840         """release transaction if created"""
   847         """release transaction if created"""
   841         if self._tr is not None:
   848         if self._tr is not None:
   842             self._tr.release()
   849             self._tr.release()