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.
--- 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")