Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/revlog.py @ 126:f6d1f8a84372
Remove some debugging code from lazyparser
author | mpm@selenic.com |
---|---|
date | Fri, 20 May 2005 17:50:11 -0800 |
parents | c7a66f9752a4 |
children | b6d8ed7aeba0 |
comparison
equal
deleted
inserted
replaced
125:8913e13196e1 | 126:f6d1f8a84372 |
---|---|
47 self.data = data | 47 self.data = data |
48 self.s = struct.calcsize(indexformat) | 48 self.s = struct.calcsize(indexformat) |
49 self.l = len(data)/self.s | 49 self.l = len(data)/self.s |
50 self.index = [None] * self.l | 50 self.index = [None] * self.l |
51 self.map = {nullid: -1} | 51 self.map = {nullid: -1} |
52 | |
53 if 0: | |
54 n = 0 | |
55 i = self.data | |
56 s = struct.calcsize(indexformat) | |
57 for f in xrange(0, len(i), s): | |
58 # offset, size, base, linkrev, p1, p2, nodeid | |
59 e = struct.unpack(indexformat, i[f:f + s]) | |
60 self.map[e[6]] = n | |
61 self.index.append(e) | |
62 n += 1 | |
63 | 52 |
64 def load(self, pos): | 53 def load(self, pos): |
65 block = pos / 1000 | 54 block = pos / 1000 |
66 i = block * 1000 | 55 i = block * 1000 |
67 end = min(self.l, i + 1000) | 56 end = min(self.l, i + 1000) |