Fix traceback on bad revlog.lookup
authorMatt Mackall <mpm@selenic.com>
Sat, 15 Oct 2005 15:49:05 -0700
changeset 1393 67779d34cb52
parent 1392 32d8068b3e36
child 1394 b20b683e8d95
Fix traceback on bad revlog.lookup
mercurial/revlog.py
--- a/mercurial/revlog.py	Sat Oct 15 15:43:40 2005 -0700
+++ b/mercurial/revlog.py	Sat Oct 15 15:49:05 2005 -0700
@@ -293,8 +293,8 @@
             for n in self.nodemap:
                 if hex(n).startswith(id):
                     c.append(n)
-            if len(c) > 1: raise KeyError("Ambiguous identifier")
-            if len(c) < 1: raise KeyError("No match found")
+            if len(c) > 1: raise RevlogError("Ambiguous identifier")
+            if len(c) < 1: raise RevlogError("No match found")
             return c[0]
 
         return None