mercurial/revset.py
changeset 46115 be3d8178251e
parent 46113 59fa3890d40a
child 46663 a4c19a162615
--- a/mercurial/revset.py	Thu Dec 10 01:18:15 2020 -0800
+++ b/mercurial/revset.py	Wed Dec 09 20:22:25 2020 -0800
@@ -2691,7 +2691,15 @@
 
 
 def lookupfn(repo):
-    return lambda symbol: scmutil.isrevsymbol(repo, symbol)
+    def fn(symbol):
+        try:
+            return scmutil.isrevsymbol(repo, symbol)
+        except error.AmbiguousPrefixLookupError:
+            raise error.InputError(
+                b'ambiguous revision identifier: %s' % symbol
+            )
+
+    return fn
 
 
 def match(ui, spec, lookup=None):