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