Show More
@@ -354,19 +354,25 b' class revlog(object):' | |||||
354 | base = index[rev][3] |
|
354 | base = index[rev][3] | |
355 | return base |
|
355 | return base | |
356 | def chainlen(self, rev): |
|
356 | def chainlen(self, rev): | |
|
357 | return self._chaininfo(rev)[0] | |||
|
358 | def _chaininfo(self, rev): | |||
357 | index = self.index |
|
359 | index = self.index | |
358 | generaldelta = self._generaldelta |
|
360 | generaldelta = self._generaldelta | |
359 | iterrev = rev |
|
361 | iterrev = rev | |
360 | e = index[iterrev] |
|
362 | e = index[iterrev] | |
361 | clen = 0 |
|
363 | clen = 0 | |
|
364 | compresseddeltalen = 0 | |||
362 | while iterrev != e[3]: |
|
365 | while iterrev != e[3]: | |
363 | clen += 1 |
|
366 | clen += 1 | |
|
367 | compresseddeltalen += e[1] | |||
364 | if generaldelta: |
|
368 | if generaldelta: | |
365 | iterrev = e[3] |
|
369 | iterrev = e[3] | |
366 | else: |
|
370 | else: | |
367 | iterrev -= 1 |
|
371 | iterrev -= 1 | |
368 | e = index[iterrev] |
|
372 | e = index[iterrev] | |
369 | return clen |
|
373 | # add text length of base since decompressing that also takes work | |
|
374 | compresseddeltalen += e[1] | |||
|
375 | return clen, compresseddeltalen | |||
370 | def flags(self, rev): |
|
376 | def flags(self, rev): | |
371 | return self.index[rev][0] & 0xFFFF |
|
377 | return self.index[rev][0] & 0xFFFF | |
372 | def rawsize(self, rev): |
|
378 | def rawsize(self, rev): |
General Comments 0
You need to be logged in to leave comments.
Login now