mercurial/revlog.py
changeset 29396 d0ae5b8f80dc
parent 29339 a9e010cd66e1
child 29732 0806fa2a39d8
--- a/mercurial/revlog.py	Thu Jun 23 20:45:37 2016 -0400
+++ b/mercurial/revlog.py	Wed Jun 22 21:30:49 2016 +0100
@@ -941,8 +941,11 @@
             return None
         except RevlogError:
             # parsers.c radix tree lookup gave multiple matches
+            # fast path: for unfiltered changelog, radix tree is accurate
+            if not getattr(self, 'filteredrevs', None):
+                raise LookupError(id, self.indexfile,
+                                  _('ambiguous identifier'))
             # fall through to slow path that filters hidden revisions
-            pass
         except (AttributeError, ValueError):
             # we are pure python, or key was too short to search radix tree
             pass