diff mercurial/transaction.py @ 48362:3f618484eeb6 stable

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 31 Jan 2022 19:28:58 +0100
parents 88439c6fbafc
children 111f5a0cbcaa
line wrap: on
line diff
--- 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