Mercurial > hg
changeset 1403:bc3e66edb04c
lazyindex fix, make load handle negative indexes properly.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Tue, 18 Oct 2005 20:05:54 -0700 |
parents | 9d2c2e6b32b5 |
children | 67e20e27d8df |
files | mercurial/revlog.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Oct 18 18:38:39 2005 -0700 +++ b/mercurial/revlog.py Tue Oct 18 20:05:54 2005 -0700 @@ -98,6 +98,8 @@ def __len__(self): return len(self.p.index) def load(self, pos): + if pos < 0: + pos += len(self.p.index) self.p.load(pos) return self.p.index[pos] def __getitem__(self, pos):