# HG changeset patch # User Matt Mackall # Date 1120875057 28800 # Node ID b3bba126b04ab2f24274a1bcf5a224c6317c8e0d # Parent fafc16f705b6cb413897577b67918af55e1baafe Fix out of range regression -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fix out of range regression From: Filip Brcic The old revlog.py issued "index out of range" error when cloning the repository Now I have reverted the parts of revlog.py to the old state when prev was initialized as -1 and later assigned self.tip() only if that is possible. Previously prev was always initialized as self.tip() and that is where the out of range error was. manifest hash: c94c9aee8b6d382ef52c3981f306a6e7e5f4c4d1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCzzIxywK+sNU5EO8RAtlcAJ0TX9FXuC2c3YHuYXNwqZhdzPWUlgCggq+a yJzUKDKH/gvnD3Tx3jcmCn8= =euPi -----END PGP SIGNATURE----- diff -r fafc16f705b6 -r b3bba126b04a mercurial/revlog.py --- a/mercurial/revlog.py Fri Jul 08 13:35:02 2005 -0800 +++ b/mercurial/revlog.py Fri Jul 08 18:10:57 2005 -0800 @@ -475,7 +475,7 @@ t = r - 1 node = nullid - base = -1 + base = prev = -1 start = end = measure = 0 if r: start = self.start(self.base(t)) @@ -491,7 +491,6 @@ # loop through our set of deltas chain = None - prev = self.tip() for chunk in revs: node, p1, p2, cs = struct.unpack("20s20s20s20s", chunk[:80]) link = linkmapper(cs)