pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  There are extensions like pushrebase, pushvars which run hooks on a server
  before taking the lock. Since the lock is not taken, transaction is not there,
  so the hookargs can't be stored on the transaction. Adding hooksargs to bundle
  operation object will help in running hooks before taking the lock.
  
  This is a part of moving fb's extension bundle2hooks to core.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D208

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -299,6 +299,10 @@
         self.gettransaction = transactiongetter
         self.reply = None
         self.captureoutput = captureoutput
+        self.hookargs = {}
+
+    def addhookargs(self, hookargs):
+        self.hookargs.update(hookargs)
 
 class TransactionUnavailable(RuntimeError):
     pass



To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to