Show More
@@ -349,6 +349,15 class revlog(object): | |||
|
349 | 349 | rev = base |
|
350 | 350 | base = index[rev][3] |
|
351 | 351 | return base |
|
352 | def chainlength(self, rev): | |
|
353 | index = self.index | |
|
354 | base = index[rev][3] | |
|
355 | length = index[rev][1] | |
|
356 | while base != rev: | |
|
357 | rev = base | |
|
358 | base = index[rev][3] | |
|
359 | length = length + index[rev][1] | |
|
360 | return length | |
|
352 | 361 | def flags(self, rev): |
|
353 | 362 | return self.index[rev][0] & 0xFFFF |
|
354 | 363 | def rawsize(self, rev): |
@@ -1046,10 +1055,11 class revlog(object): | |||
|
1046 | 1055 | chainbase = basecache[1] |
|
1047 | 1056 | else: |
|
1048 | 1057 | chainbase = self.chainbase(rev) |
|
1049 | dist = l + offset - self.start(chainbase) | |
|
1050 | 1058 | if self._generaldelta: |
|
1059 | dist = l + self.chainlength(rev) | |
|
1051 | 1060 | base = rev |
|
1052 | 1061 | else: |
|
1062 | dist = l + offset - self.start(chainbase) | |
|
1053 | 1063 | base = chainbase |
|
1054 | 1064 | return dist, l, data, base, chainbase |
|
1055 | 1065 |
General Comments 0
You need to be logged in to leave comments.
Login now