changeset 3586:66a17364c30e

filelog: rename filelog.size() to filelog.len() filelog.size() is misleading for users of revlog.size() since it doesn't return the size of the revision.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 29 Oct 2006 16:33:46 +0100
parents cac2c17bec5a
children c8494fcc9d39 c2f82db92ae1
files mercurial/context.py mercurial/filelog.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sun Oct 29 16:14:55 2006 +0100
+++ b/mercurial/context.py	Sun Oct 29 16:33:46 2006 +0100
@@ -203,7 +203,7 @@
     def data(self): return self._filelog.read(self._filenode)
     def renamed(self): return self._filelog.renamed(self._filenode)
     def path(self): return self._path
-    def size(self): return self._filelog.size(self._filerev)
+    def size(self): return self._filelog.len(self._filerev)
 
     def cmp(self, text): return self._filelog.cmp(self._filenode, text)
 
--- a/mercurial/filelog.py	Sun Oct 29 16:14:55 2006 +0100
+++ b/mercurial/filelog.py	Sun Oct 29 16:33:46 2006 +0100
@@ -65,15 +65,15 @@
             return (m["copy"], bin(m["copyrev"]))
         return False
 
-    def size(self, rev):
-        """return the size of a given revision"""
+    def len(self, rev):
+        """return the len of a given revision"""
 
         # for revisions with renames, we have to go the slow way
         node = self.node(rev)
         if self.renamed(node):
             return len(self.read(node))
 
-        return revlog.size(self, rev)
+        return self.size(rev)
 
     def cmp(self, node, text):
         """compare text with a given file revision"""