revlog: use revlog.display_id in censor related errors
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 03 May 2021 12:24:29 +0200
changeset 47161 f574734eb2b7
parent 47160 0a66eef0ed97
child 47162 dfe8074239de
revlog: use revlog.display_id in censor related errors Differential Revision: https://phab.mercurial-scm.org/D10587
mercurial/revlog.py
--- 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):