mercurial/transaction.py
changeset 23281 f60ed8cf4afc
parent 23280 b01c491af0cf
child 23282 6c1351352b6c
--- a/mercurial/transaction.py	Sat Nov 08 16:27:50 2014 +0000
+++ b/mercurial/transaction.py	Sat Nov 08 16:31:38 2014 +0000
@@ -304,6 +304,8 @@
     def addfinalize(self, category, callback):
         """add a callback to be called when the transaction is closed
 
+        The transaction will be given as callback's first argument.
+
         Category is a unique identifier to allow overwriting old callbacks with
         newer callbacks.
         """
@@ -325,7 +327,7 @@
             self._generatefiles()
             categories = sorted(self._finalizecallback)
             for cat in categories:
-                self._finalizecallback[cat]()
+                self._finalizecallback[cat](self)
             self.onclose()
 
         self.count -= 1