D12127: transaction: add a way to know a transaction has been finalized

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Feb 1 16:51:56 UTC 2022


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This will be useful to fix the timing of the branchmap on disk caching.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

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
@@ -229,6 +229,10 @@
         if self._journal:
             self._abort()
 
+    @property
+    def finalized(self):
+        return self._finalizecallback is None
+
     @active
     def startgroup(self):
         """delay registration of file entry



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


More information about the Mercurial-devel mailing list