transaction: add a way to know a transaction has been finalized stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 31 Jan 2022 19:28:58 +0100
branchstable
changeset 48676 3f618484eeb6
parent 48675 6ed7ee9f44db
child 48677 8e5effbf52d0
transaction: add a way to know a transaction has been finalized This will be useful to fix the timing of the branchmap on disk caching. Differential Revision: https://phab.mercurial-scm.org/D12127
mercurial/transaction.py
--- a/mercurial/transaction.py	Tue Feb 01 15:14:05 2022 +0100
+++ b/mercurial/transaction.py	Mon Jan 31 19:28:58 2022 +0100
@@ -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