comparison mercurial/revlog.py @ 1393:67779d34cb52

Fix traceback on bad revlog.lookup
author Matt Mackall <mpm@selenic.com>
date Sat, 15 Oct 2005 15:49:05 -0700
parents 0e2be889ccd7
children cf9a1233738a
comparison
equal deleted inserted replaced
1392:32d8068b3e36 1393:67779d34cb52
291 except (ValueError, OverflowError): 291 except (ValueError, OverflowError):
292 c = [] 292 c = []
293 for n in self.nodemap: 293 for n in self.nodemap:
294 if hex(n).startswith(id): 294 if hex(n).startswith(id):
295 c.append(n) 295 c.append(n)
296 if len(c) > 1: raise KeyError("Ambiguous identifier") 296 if len(c) > 1: raise RevlogError("Ambiguous identifier")
297 if len(c) < 1: raise KeyError("No match found") 297 if len(c) < 1: raise RevlogError("No match found")
298 return c[0] 298 return c[0]
299 299
300 return None 300 return None
301 301
302 def diff(self, a, b): 302 def diff(self, a, b):