diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -203,7 +203,7 @@ class filectx(object): 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) diff --git a/mercurial/filelog.py b/mercurial/filelog.py --- a/mercurial/filelog.py +++ b/mercurial/filelog.py @@ -65,15 +65,15 @@ class filelog(revlog): 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"""