comparison mercurial/revlog.py @ 484:934279f3ca53

Pull from TAH -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pull from TAH manifest hash: 470ea90dd95189a019f4d96016a45db8a297b841 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCvzZzywK+sNU5EO8RAkZhAKCUJKX1vFtkFxV7qFwbuWQj62zcnQCfU687 jxKpBVesIXSOpBO4NbW/RIM= =hSBe -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sun, 26 Jun 2005 15:12:51 -0800
parents e205194ca7ef 0a338d506268
children 03f27b1381f9
comparison
equal deleted inserted replaced
474:b2ae8283d1a6 484:934279f3ca53
193 def lookup(self, id): 193 def lookup(self, id):
194 try: 194 try:
195 rev = int(id) 195 rev = int(id)
196 if str(rev) != id: raise ValueError 196 if str(rev) != id: raise ValueError
197 if rev < 0: rev = self.count() + rev 197 if rev < 0: rev = self.count() + rev
198 if rev < 0 or rev >= self.count: raise ValueError 198 if rev < 0 or rev >= self.count(): raise ValueError
199 return self.node(rev) 199 return self.node(rev)
200 except (ValueError, OverflowError): 200 except (ValueError, OverflowError):
201 c = [] 201 c = []
202 for n in self.nodemap: 202 for n in self.nodemap:
203 if hex(n).startswith(id): 203 if hex(n).startswith(id):