revlog: use revlog.display_id in error related to bad revisions
Differential Revision: https://phab.mercurial-scm.org/D10589
--- a/mercurial/revlog.py Mon May 03 12:24:40 2021 +0200
+++ b/mercurial/revlog.py Mon May 03 12:24:50 2021 +0200
@@ -2033,7 +2033,7 @@
"""
if link == nullrev:
raise error.RevlogError(
- _(b"attempted to add linkrev -1 to %s") % self._indexfile
+ _(b"attempted to add linkrev -1 to %s") % self.display_id
)
if sidedata is None:
@@ -2229,14 +2229,14 @@
"""
if node == self.nullid:
raise error.RevlogError(
- _(b"%s: attempt to add null revision") % self._indexfile
+ _(b"%s: attempt to add null revision") % self.display_id
)
if (
node == self.nodeconstants.wdirid
or node in self.nodeconstants.wdirfilenodeids
):
raise error.RevlogError(
- _(b"%s: attempt to add wdir revision") % self._indexfile
+ _(b"%s: attempt to add wdir revision") % self.display_id
)
if self._inline: