# HG changeset patch # User Raphaël Gomès # Date 2024-06-19 16:06:50 # Node ID 2fd44b3dcc33448be26533d246e259f049acd7e1 # Parent b04011ca6effcd041723985651ae5a68ffbab4f5 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. diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -3160,7 +3160,7 @@ class revlog: 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)