diff mercurial/filelog.py @ 19148:3bda242bf244

filelog: use super() for calling base functions filelog had some hardcoded revlog.revlog.foo() calls. This changes it to use super() instead so that extensions can replace the filelog base class.
author Durham Goode <durham@fb.com>
date Wed, 01 May 2013 10:39:37 -0700
parents 7c231754a621
children 4669e26747c3
line wrap: on
line diff
--- a/mercurial/filelog.py	Thu May 02 21:28:18 2013 -0500
+++ b/mercurial/filelog.py	Wed May 01 10:39:37 2013 -0700
@@ -31,7 +31,7 @@
 
 class filelog(revlog.revlog):
     def __init__(self, opener, path):
-        revlog.revlog.__init__(self, opener,
+        super(filelog, self).__init__(opener,
                         "/".join(("data", path + ".i")))
 
     def read(self, node):
@@ -64,7 +64,7 @@
             return len(self.read(node))
 
         # XXX if self.read(node).startswith("\1\n"), this returns (size+4)
-        return revlog.revlog.size(self, rev)
+        return super(filelog, self).size(rev)
 
     def cmp(self, node, text):
         """compare text with a given file revision
@@ -76,7 +76,7 @@
         if text.startswith('\1\n'):
             t = '\1\n\1\n' + text
 
-        samehashes = not revlog.revlog.cmp(self, node, t)
+        samehashes = not super(filelog, self).cmp(node, t)
         if samehashes:
             return False