mercurial/revlog.py
changeset 51099 594f912818ab
parent 51098 045b5f745f93
child 51102 af96fbb8f739
--- a/mercurial/revlog.py	Wed Oct 25 23:14:20 2023 +0200
+++ b/mercurial/revlog.py	Fri Oct 20 12:13:33 2023 +0200
@@ -620,6 +620,13 @@
         """True is a writing context is open"""
         return self._writinghandles is not None
 
+    @property
+    def is_open(self):
+        """True if any file handle is being held
+
+        Used for assert and debug in the python code"""
+        return self._segmentfile.is_open or self._segmentfile_sidedata.is_open
+
     @contextlib.contextmanager
     def writing(self, transaction, data_end=None, sidedata_end=None):
         """Open the revlog files for writing