# HG changeset patch # User Matt Mackall # Date 1294862079 21600 # Node ID 20a54bdf232832d3d6c4e4a43361dc84ec73dca0 # Parent 911a4499adb0f6ffae86b6c70d8ce6672ddccda9 pure: update index parsing diff -r 911a4499adb0 -r 20a54bdf2328 mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py Wed Jan 12 11:34:42 2011 -0600 +++ b/mercurial/pure/parsers.py Wed Jan 12 13:54:39 2011 -0600 @@ -24,7 +24,7 @@ else: mfdict[f] = bin(n) -def parse_index(data, inline): +def parse_index2(data, inline): def gettype(q): return int(q & 0xFFFF) @@ -36,7 +36,6 @@ s = struct.calcsize(indexformatng) index = [] cache = None - nodemap = {nullid: nullrev} n = off = 0 l = len(data) - s @@ -45,7 +44,6 @@ cache = (0, data) while off <= l: e = _unpack(indexformatng, data[off:off + s]) - nodemap[e[7]] = n append(e) n += 1 if e[1] < 0: @@ -54,7 +52,6 @@ else: while off <= l: e = _unpack(indexformatng, data[off:off + s]) - nodemap[e[7]] = n append(e) n += 1 off += s @@ -67,7 +64,7 @@ # add the magic null revision at -1 index.append((0, 0, 0, -1, -1, -1, -1, nullid)) - return index, nodemap, cache + return index, cache def parse_dirstate(dmap, copymap, st): parents = [st[:20], st[20: 40]]