Make lookup a bit smarter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Make lookup a bit smarter
Handle overflow error
Handle "0000" -> nullid, not 0
manifest hash:
f3af0c171216687c621fd0214efe45775e5a1d34
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCu2PrywK+sNU5EO8RArqWAJ9hafXgnHjCDE/Sxtvyo+e+qmPaGgCfR8AV
DCG3i0NasG3ItbPvux2Dm5Q=
=zjqN
-----END PGP SIGNATURE-----
--- a/mercurial/revlog.py Thu Jun 23 17:33:07 2005 -0800
+++ b/mercurial/revlog.py Thu Jun 23 17:37:47 2005 -0800
@@ -192,8 +192,9 @@
def lookup(self, id):
try:
rev = int(id)
+ if str(rev) != id: raise "mismatch"
return self.node(rev)
- except ValueError:
+ except:
c = []
for n in self.nodemap:
if id in hex(n):