revlog.size: remove alternate implementation (revlogv0 specific)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 09 Feb 2010 14:02:07 +0100
changeset 10404 3e7cbe859871
parent 10403 b8acd325773e
child 10405 2d30d66a89ad
revlog.size: remove alternate implementation (revlogv0 specific) it's only useful for revlogv0 anyway, revlogNG has the uncompressed size in the index.
mercurial/revlog.py
--- a/mercurial/revlog.py	Tue Feb 09 13:48:52 2010 +0100
+++ b/mercurial/revlog.py	Tue Feb 09 14:02:07 2010 +0100
@@ -537,26 +537,6 @@
         t = self.revision(self.node(rev))
         return len(t)
 
-        # Alternate implementation. The advantage to this code is it
-        # will be faster for a single revision. However, the results
-        # are not cached, so finding the size of every revision will
-        # be slower.
-        #
-        # if self.cache and self.cache[1] == rev:
-        #     return len(self.cache[2])
-        #
-        # base = self.base(rev)
-        # if self.cache and self.cache[1] >= base and self.cache[1] < rev:
-        #     base = self.cache[1]
-        #     text = self.cache[2]
-        # else:
-        #     text = self.revision(self.node(base))
-        #
-        # l = len(text)
-        # for x in xrange(base + 1, rev + 1):
-        #     l = mdiff.patchedsize(l, self._chunk(x))
-        # return l
-
     def reachable(self, node, stop=None):
         """return the set of all nodes ancestral to a given node, including
          the node itself, stopping when stop is matched"""