##// END OF EJS Templates
bundle2: drop the experimental hooks...
Pierre-Yves David -
r24697:52ff737c default
parent child Browse files
Show More
@@ -851,15 +851,6 b' class transactionmanager(object):'
851 def close(self):
851 def close(self):
852 """close transaction if created"""
852 """close transaction if created"""
853 if self._tr is not None:
853 if self._tr is not None:
854 repo = self.repo
855 p = lambda: self._tr.writepending() and repo.root or ""
856 repo.hook('b2x-pretransactionclose', throw=True, pending=p,
857 **self._tr.hookargs)
858 hookargs = dict(self._tr.hookargs)
859 def runhooks():
860 repo.hook('b2x-transactionclose', **hookargs)
861 self._tr.addpostclose('b2x-hook-transactionclose',
862 lambda tr: repo._afterlock(runhooks))
863 self._tr.close()
854 self._tr.close()
864
855
865 def release(self):
856 def release(self):
@@ -1290,14 +1281,6 b' def unbundle(repo, cg, heads, source, ur'
1290 tr.hookargs['url'] = url
1281 tr.hookargs['url'] = url
1291 tr.hookargs['bundle2'] = '1'
1282 tr.hookargs['bundle2'] = '1'
1292 r = bundle2.processbundle(repo, cg, lambda: tr).reply
1283 r = bundle2.processbundle(repo, cg, lambda: tr).reply
1293 p = lambda: tr.writepending() and repo.root or ""
1294 repo.hook('b2x-pretransactionclose', throw=True, pending=p,
1295 **tr.hookargs)
1296 hookargs = dict(tr.hookargs)
1297 def runhooks():
1298 repo.hook('b2x-transactionclose', **hookargs)
1299 tr.addpostclose('b2x-hook-transactionclose',
1300 lambda tr: repo._afterlock(runhooks))
1301 tr.close()
1284 tr.close()
1302 except Exception, exc:
1285 except Exception, exc:
1303 exc.duringunbundle2 = True
1286 exc.duringunbundle2 = True
General Comments 0
You need to be logged in to leave comments. Login now