# HG changeset patch # User Brendan Cully # Date 1170634136 28800 # Node ID 40030c1b6bc68cf4c6f37c0eb7efa76af3d58834 # Parent 82eb0fafb56d5767af52ed60cd272311675b547f lazyindex: handle __delitem__ in loadblock diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -146,6 +146,9 @@ class lazyparser(object): 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]