Mercurial > hg
changeset 4061:40030c1b6bc6
lazyindex: handle __delitem__ in loadblock
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Sun, 04 Feb 2007 16:08:56 -0800 |
parents | 82eb0fafb56d |
children | 516f883e3d79 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Jan 30 21:11:10 2007 -0200 +++ b/mercurial/revlog.py Sun Feb 04 16:08:56 2007 -0800 @@ -146,6 +146,9 @@ lend = len(data) / self.s i = blockstart / self.s off = 0 + # lazyindex supports __delitem__ + if lend > len(self.index) - i: + lend = len(self.index) - i for x in xrange(lend): if self.index[i + x] == None: b = data[off : off + self.s]