Commit bb9be2f1 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

error: remove shortening of node in error message

This makes it difficult to figure what exactly was node on which LookupError was
called if we only have the error message.

I was debugging an error message which contained a short node and I tried to
find out which callers raise LookupError with a short node. This turned out to
be wrong because we short-ed the node before printing.

Let's be explicit and show whatever is passed to LookupError. If a short node is
to be displayed, that should be done by callers.
parent d6e73351533b
Pipeline #17745 failed with stages
in 29 minutes and 39 seconds
......@@ -71,10 +71,6 @@ class LookupError(RevlogError, KeyError):
# this can't be called 'message' because at least some installs of
# Python 2.6+ complain about the 'message' property being deprecated
self.lookupmessage = message
if isinstance(name, bytes) and len(name) == 20:
from .node import short
name = short(name)
# if name is a binary node, it can be None
RevlogError.__init__(
self, b'%s@%s: %s' % (index, pycompat.bytestr(name), message)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment