--- 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