Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 476:0a338d506268
Really _call_ method revlog.count in revlog.lookup()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Really _call_ method revlog.count in revlog.lookup()
This fixes e.g. 'hg export 398737777' (exists in the mercurial repo).
manifest hash: 9de9ad4c40d0746cb3db346a01c373e3b4aba54a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCvovbW7P1GVgWeRoRAiyEAJ9gVZZiMGA3YItcWRHeai/9C+dMTgCbBiii
QoFaXQ9wZDds8fVVsvENAYw=
=msWK
-----END PGP SIGNATURE-----
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 26 Jun 2005 12:04:59 +0100 |
parents | e205194ca7ef |
children | 934279f3ca53 |
comparison
equal
deleted
inserted
replaced
475:ab53998b9dcd | 476:0a338d506268 |
---|---|
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): |