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

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2022, 4:51 p.m.
Message ID <differential-rev-PHID-DREV-g3yt6ade6hh6xibfnwb2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50460/
State New
Headers show

Comments

phabricator - Feb. 1, 2022, 4:51 p.m.
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




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

Patch

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