# HG changeset patch # User Pierre-Yves David # Date 2021-05-03 10:24:29 # Node ID f574734eb2b7266baadba750f3de74ba0fc04e23 # Parent 0a66eef0ed9765694e50583fc6930d12b05fb66f revlog: use revlog.display_id in censor related errors Differential Revision: https://phab.mercurial-scm.org/D10587 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1945,7 +1945,7 @@ class revlog(object): ) except error.RevlogError: if self._censorable and storageutil.iscensoredtext(text): - raise error.CensoredNodeError(self._indexfile, node, text) + raise error.CensoredNodeError(self.display_id, node, text) raise def _enforceinlinesize(self, tr, fp=None): @@ -2479,7 +2479,7 @@ class revlog(object): newlen = len(delta) - hlen if delta[:hlen] != mdiff.replacediffheader(oldlen, newlen): raise error.CensoredBaseError( - self._indexfile, self.node(baserev) + self.display_id, self.node(baserev) ) if not flags and self._peek_iscensored(baserev, delta, flush):