[Request] [+ ] D10589: revlog: use revlog.display_id in error related to bad revisions
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon May 3 12:07:33 UTC 2021
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/D10589
AFFECTED FILES
mercurial/revlog.py
CHANGE DETAILS
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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:
To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210503/3e4c4c12/attachment.html>
More information about the Mercurial-patches
mailing list