diff mercurial/transaction.py @ 21150:0d05915b688d

transaction: add a notion of hook arguments It is now possible to register parameters to be used when invoking hooks in this transaction. This will cope with the fact that bundle2 adds multiple data types in a single transaction. Do not expect any wide and consistent usages of this in the next release. This will be used by bundle2 experiments first. It will be made better for the release after.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 17 Apr 2014 17:04:59 -0400
parents 203908968644
children c77418938d05
line wrap: on
line diff
--- a/mercurial/transaction.py	Thu Apr 17 16:54:15 2014 -0400
+++ b/mercurial/transaction.py	Thu Apr 17 17:04:59 2014 -0400
@@ -86,6 +86,8 @@
         self.backupmap = {}
         self.journal = journal
         self._queue = []
+        # a dict of arguments to be passed to hooks
+        self.hookargs = {}
 
         self.backupjournal = "%s.backupfiles" % journal
         self.file = opener.open(self.journal, "w")