mercurial/transaction.py
changeset 33099 fcd1c483f5ea
parent 33068 2312e70cf78b
child 33278 87bca10a06ed
--- a/mercurial/transaction.py	Sun Jun 25 22:30:14 2017 -0700
+++ b/mercurial/transaction.py	Sun Jun 25 10:38:45 2017 -0700
@@ -412,7 +412,7 @@
 
     @active
     def addpostclose(self, category, callback):
-        """add a callback to be called after the transaction is closed
+        """add or replace a callback to be called after the transaction closed
 
         The transaction will be given as callback's first argument.
 
@@ -422,6 +422,11 @@
         self._postclosecallback[category] = callback
 
     @active
+    def getpostclose(self, category):
+        """return a postclose callback added before, or None"""
+        return self._postclosecallback.get(category, None)
+
+    @active
     def addabort(self, category, callback):
         """add a callback to be called when the transaction is aborted.