Show More
@@ -405,19 +405,17 b' class revlog(object):' | |||||
405 | if n == 0 and self.inlinedata(): |
|
405 | if n == 0 and self.inlinedata(): | |
406 | # cache the first chunk |
|
406 | # cache the first chunk | |
407 | self.chunkcache = (0, data) |
|
407 | self.chunkcache = (0, data) | |
|
408 | if leftover: | |||
|
409 | data = leftover + data | |||
|
410 | leftover = None | |||
408 | off = 0 |
|
411 | off = 0 | |
409 | l = len(data) |
|
412 | l = len(data) | |
410 | while off < l: |
|
413 | while off < l: | |
411 | if l - off < s: |
|
414 | if l - off < s: | |
412 | leftover = data[off:] |
|
415 | leftover = data[off:] | |
413 | break |
|
416 | break | |
414 | if leftover: |
|
417 | cur = data[off:off + s] | |
415 | cur = leftover + data[off:off + s - len(leftover)] |
|
418 | off += s | |
416 | off += s - len(leftover) |
|
|||
417 | leftover = None |
|
|||
418 | else: |
|
|||
419 | cur = data[off:off + s] |
|
|||
420 | off += s |
|
|||
421 | e = struct.unpack(self.indexformat, cur) |
|
419 | e = struct.unpack(self.indexformat, cur) | |
422 | self.index.append(e) |
|
420 | self.index.append(e) | |
423 | self.nodemap[e[-1]] = n |
|
421 | self.nodemap[e[-1]] = n |
General Comments 0
You need to be logged in to leave comments.
Login now