changeset 47175:f574734eb2b7

revlog: use revlog.display_id in censor related errors Differential Revision: https://phab.mercurial-scm.org/D10587
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:24:29 +0200
parents 0a66eef0ed97
children dfe8074239de
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):