Show More
@@ -360,19 +360,26 b' class revlogio(object):' | |||||
360 | n = off = 0 |
|
360 | n = off = 0 | |
361 | # if we're not using lazymap, always read the whole index |
|
361 | # if we're not using lazymap, always read the whole index | |
362 | data = fp.read() |
|
362 | data = fp.read() | |
363 | l = len(data) |
|
363 | l = len(data) - s | |
|
364 | unpack = struct.unpack | |||
|
365 | append = index.append | |||
364 | if inline: |
|
366 | if inline: | |
365 | cache = (0, data) |
|
367 | cache = (0, data) | |
366 |
while off |
|
368 | while off <= l: | |
367 |
e = |
|
369 | e = unpack(indexformatng, data[off:off + s]) | |
368 |
|
|
370 | nodemap[e[7]] = n | |
369 | nodemap[e[7]] = n |
|
371 | append(e) | |
370 | n += 1 |
|
372 | n += 1 | |
371 | off += s |
|
|||
372 | if inline: |
|
|||
373 | if e[1] < 0: |
|
373 | if e[1] < 0: | |
374 | break |
|
374 | break | |
375 | off += e[1] |
|
375 | off += e[1] + s | |
|
376 | else: | |||
|
377 | while off <= l: | |||
|
378 | e = unpack(indexformatng, data[off:off + s]) | |||
|
379 | nodemap[e[7]] = n | |||
|
380 | append(e) | |||
|
381 | n += 1 | |||
|
382 | off += s | |||
376 |
|
383 | |||
377 | e = list(index[0]) |
|
384 | e = list(index[0]) | |
378 | type = gettype(e[0]) |
|
385 | type = gettype(e[0]) |
General Comments 0
You need to be logged in to leave comments.
Login now