mercurial/error.py
changeset 45898 1817b66897ad
parent 45897 8cc9e7f762d6
child 45899 98399dd1b96c
--- a/mercurial/error.py	Thu Nov 19 12:20:26 2020 -0800
+++ b/mercurial/error.py	Thu Nov 19 11:23:59 2020 -0800
@@ -297,9 +297,12 @@
     def __init__(self, function, symbols):
         from .i18n import _
 
-        ParseError.__init__(self, _(b"unknown identifier: %s") % function)
-        self.function = function
-        self.symbols = symbols
+        similar = getsimilar(symbols, function)
+        hint = similarity_hint(similar)
+
+        ParseError.__init__(
+            self, _(b"unknown identifier: %s") % function, hint=hint
+        )
 
 
 class RepoError(Hint, Exception):