Show More
@@ -535,25 +535,25 b' class revlog(object):' | |||||
535 | t = self.revision(self.node(rev)) |
|
535 | t = self.revision(self.node(rev)) | |
536 | return len(t) |
|
536 | return len(t) | |
537 |
|
537 | |||
538 |
# |
|
538 | # Alternate implementation. The advantage to this code is it | |
539 |
# will be faster for a single revision. |
|
539 | # will be faster for a single revision. However, the results | |
540 |
# cached, so finding the size of every revision will |
|
540 | # are not cached, so finding the size of every revision will | |
541 | """ |
|
541 | # be slower. | |
542 | if self.cache and self.cache[1] == rev: |
|
542 | # | |
543 | return len(self.cache[2]) |
|
543 | # if self.cache and self.cache[1] == rev: | |
544 |
|
544 | # return len(self.cache[2]) | ||
545 | base = self.base(rev) |
|
545 | # | |
546 | if self.cache and self.cache[1] >= base and self.cache[1] < rev: |
|
546 | # base = self.base(rev) | |
547 | base = self.cache[1] |
|
547 | # if self.cache and self.cache[1] >= base and self.cache[1] < rev: | |
548 |
|
|
548 | # base = self.cache[1] | |
549 | else: |
|
549 | # text = self.cache[2] | |
550 | text = self.revision(self.node(base)) |
|
550 | # else: | |
551 |
|
551 | # text = self.revision(self.node(base)) | ||
552 | l = len(text) |
|
552 | # | |
553 | for x in xrange(base + 1, rev + 1): |
|
553 | # l = len(text) | |
554 | l = mdiff.patchedsize(l, self._chunk(x)) |
|
554 | # for x in xrange(base + 1, rev + 1): | |
555 | return l |
|
555 | # l = mdiff.patchedsize(l, self._chunk(x)) | |
556 | """ |
|
556 | # return l | |
557 |
|
557 | |||
558 | def reachable(self, node, stop=None): |
|
558 | def reachable(self, node, stop=None): | |
559 | """return the set of all nodes ancestral to a given node, including |
|
559 | """return the set of all nodes ancestral to a given node, including |
General Comments 0
You need to be logged in to leave comments.
Login now