revlog: use the method to check if the revlog is being written to
This was probably fine, but it could become not fine at some point.
--- a/mercurial/revlog.py Wed Jun 19 17:26:06 2024 +0200
+++ b/mercurial/revlog.py Wed Jun 19 18:06:50 2024 +0200
@@ -3160,7 +3160,7 @@
raise error.RevlogError(
_(b"%s: attempt to add wdir revision") % self.display_id
)
- if self._inner._writinghandles is None:
+ if not self._inner.is_writing:
msg = b'adding revision outside `revlog._writing` context'
raise error.ProgrammingError(msg)