D7832: transaction: add a `hasfinalize` method

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Jan 13 09:19:57 EST 2020


Closed by commit rHG8e09551206f5: transaction: add a `hasfinalize` method (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7832?vs=19152&id=19167

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7832/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7832

AFFECTED FILES
  mercurial/transaction.py

CHANGE DETAILS

diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -456,6 +456,12 @@
         return self._anypending
 
     @active
+    def hasfinalize(self, category):
+        """check is a callback already exist for a category
+        """
+        return category in self._finalizecallback
+
+    @active
     def addfinalize(self, category, callback):
         """add a callback to be called when the transaction is closed
 



To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list