Patchwork D10587: revlog: use revlog.display_id in censor related errors

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-rfqogntk7hl32ysp23m4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48905/
State Superseded
Headers show

Comments

phabricator - May 3, 2021, 12:07 p.m.
marmoute created this revision.
Herald added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10587

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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):