revlog: use revlog.display_id in censor related errors
Differential Revision: https://phab.mercurial-scm.org/D10587
--- a/mercurial/revlog.py Mon May 03 12:24:18 2021 +0200
+++ b/mercurial/revlog.py Mon May 03 12:24:29 2021 +0200
@@ -1945,7 +1945,7 @@
)
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 @@
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):