changeset 13261:20a54bdf2328

pure: update index parsing
author Matt Mackall <mpm@selenic.com>
date Wed, 12 Jan 2011 13:54:39 -0600
parents 911a4499adb0
children 2f532ea537a6
files mercurial/pure/parsers.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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]]