revlog/parseindex: no need to pass the file around
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sat, 15 Jan 2011 15:04:58 +0100
changeset 13264 8439526fb407
parent 13263 c45b5faa6213
child 13265 04b302ce2781
revlog/parseindex: no need to pass the file around
mercurial/revlog.py
--- a/mercurial/revlog.py	Sat Jan 15 12:44:28 2011 +0100
+++ b/mercurial/revlog.py	Sat Jan 15 15:04:58 2011 +0100
@@ -126,7 +126,7 @@
     def __init__(self):
         self.size = struct.calcsize(indexformatv0)
 
-    def parseindex(self, fp, data, inline):
+    def parseindex(self, data, inline):
         s = self.size
         index = []
         nodemap =  {nullid: nullrev}
@@ -170,7 +170,7 @@
     def __init__(self):
         self.size = struct.calcsize(indexformatng)
 
-    def parseindex(self, fp, data, inline):
+    def parseindex(self, data, inline):
         # call the C implementation to parse the index data
         index, cache = parsers.parse_index2(data, inline)
         return index, None, cache
@@ -264,7 +264,7 @@
             self._io = revlogoldio()
         if i:
             try:
-                d = self._io.parseindex(f, i, self._inline)
+                d = self._io.parseindex(i, self._inline)
             except (ValueError, IndexError):
                 raise RevlogError(_("index %s is corrupted") % (self.indexfile))
             self.index, n, self._chunkcache = d