equal
deleted
inserted
replaced
852 |
852 |
853 def closetransaction(self): |
853 def closetransaction(self): |
854 """close transaction if created""" |
854 """close transaction if created""" |
855 if self._tr is not None: |
855 if self._tr is not None: |
856 repo = self.repo |
856 repo = self.repo |
857 cl = repo.unfiltered().changelog |
857 p = lambda: self._tr.writepending() and repo.root or "" |
858 p = cl.writepending() and repo.root or "" |
|
859 p = cl.writepending() and repo.root or "" |
|
860 repo.hook('b2x-pretransactionclose', throw=True, pending=p, |
858 repo.hook('b2x-pretransactionclose', throw=True, pending=p, |
861 **self._tr.hookargs) |
859 **self._tr.hookargs) |
862 self._tr.close() |
860 self._tr.close() |
863 hookargs = dict(self._tr.hookargs) |
861 hookargs = dict(self._tr.hookargs) |
864 def runhooks(): |
862 def runhooks(): |
1277 tr = repo.transaction('unbundle') |
1275 tr = repo.transaction('unbundle') |
1278 tr.hookargs['source'] = source |
1276 tr.hookargs['source'] = source |
1279 tr.hookargs['url'] = url |
1277 tr.hookargs['url'] = url |
1280 tr.hookargs['bundle2-exp'] = '1' |
1278 tr.hookargs['bundle2-exp'] = '1' |
1281 r = bundle2.processbundle(repo, cg, lambda: tr).reply |
1279 r = bundle2.processbundle(repo, cg, lambda: tr).reply |
1282 cl = repo.unfiltered().changelog |
1280 p = lambda: tr.writepending() and repo.root or "" |
1283 p = cl.writepending() and repo.root or "" |
|
1284 repo.hook('b2x-pretransactionclose', throw=True, pending=p, |
1281 repo.hook('b2x-pretransactionclose', throw=True, pending=p, |
1285 **tr.hookargs) |
1282 **tr.hookargs) |
1286 tr.close() |
1283 tr.close() |
1287 hookargs = dict(tr.hookargs) |
1284 hookargs = dict(tr.hookargs) |
1288 def runhooks(): |
1285 def runhooks(): |