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