changeset 24697:52ff737c63d2

bundle2: drop the experimental hooks The series at e9ede9b4c2f8::8e13cc0825f1 introduced generic transaction level hooking. This makes the experimental bundle2 specific hooks redundant, we drop them.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 09 Apr 2015 16:18:38 -0400
parents 553dc2b094d9
children a85c4ed1132f
files mercurial/exchange.py
diffstat 1 files changed, 0 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Fri Apr 10 15:41:33 2015 -0400
+++ b/mercurial/exchange.py	Thu Apr 09 16:18:38 2015 -0400
@@ -851,15 +851,6 @@
     def close(self):
         """close transaction if created"""
         if self._tr is not None:
-            repo = self.repo
-            p = lambda: self._tr.writepending() and repo.root or ""
-            repo.hook('b2x-pretransactionclose', throw=True, pending=p,
-                      **self._tr.hookargs)
-            hookargs = dict(self._tr.hookargs)
-            def runhooks():
-                repo.hook('b2x-transactionclose', **hookargs)
-            self._tr.addpostclose('b2x-hook-transactionclose',
-                                  lambda tr: repo._afterlock(runhooks))
             self._tr.close()
 
     def release(self):
@@ -1290,14 +1281,6 @@
                 tr.hookargs['url'] = url
                 tr.hookargs['bundle2'] = '1'
                 r = bundle2.processbundle(repo, cg, lambda: tr).reply
-                p = lambda: tr.writepending() and repo.root or ""
-                repo.hook('b2x-pretransactionclose', throw=True, pending=p,
-                          **tr.hookargs)
-                hookargs = dict(tr.hookargs)
-                def runhooks():
-                    repo.hook('b2x-transactionclose', **hookargs)
-                tr.addpostclose('b2x-hook-transactionclose',
-                                lambda tr: repo._afterlock(runhooks))
                 tr.close()
             except Exception, exc:
                 exc.duringunbundle2 = True