##// END OF EJS Templates
revlog: make triple-quoted string a real comment
Martin Geisler -
r8658:782a85ee default
parent child Browse files
Show More
@@ -535,25 +535,25 b' class revlog(object):'
535 535 t = self.revision(self.node(rev))
536 536 return len(t)
537 537
538 # alternate implementation, The advantage to this code is it
539 # will be faster for a single revision. But, the results are not
540 # cached, so finding the size of every revision will be slower.
541 """
542 if self.cache and self.cache[1] == rev:
543 return len(self.cache[2])
544
545 base = self.base(rev)
546 if self.cache and self.cache[1] >= base and self.cache[1] < rev:
547 base = self.cache[1]
548 text = self.cache[2]
549 else:
550 text = self.revision(self.node(base))
551
552 l = len(text)
553 for x in xrange(base + 1, rev + 1):
554 l = mdiff.patchedsize(l, self._chunk(x))
555 return l
556 """
538 # Alternate implementation. The advantage to this code is it
539 # will be faster for a single revision. However, the results
540 # are not cached, so finding the size of every revision will
541 # be slower.
542 #
543 # if self.cache and self.cache[1] == rev:
544 # return len(self.cache[2])
545 #
546 # base = self.base(rev)
547 # if self.cache and self.cache[1] >= base and self.cache[1] < rev:
548 # base = self.cache[1]
549 # text = self.cache[2]
550 # else:
551 # text = self.revision(self.node(base))
552 #
553 # l = len(text)
554 # for x in xrange(base + 1, rev + 1):
555 # l = mdiff.patchedsize(l, self._chunk(x))
556 # return l
557 557
558 558 def reachable(self, node, stop=None):
559 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