##// END OF EJS Templates
revlog/parseindex: no need to pass the file around
Benoit Boissinot -
r13264:8439526f default
parent child Browse files
Show More
@@ -126,7 +126,7 b' class revlogoldio(object):'
126 126 def __init__(self):
127 127 self.size = struct.calcsize(indexformatv0)
128 128
129 def parseindex(self, fp, data, inline):
129 def parseindex(self, data, inline):
130 130 s = self.size
131 131 index = []
132 132 nodemap = {nullid: nullrev}
@@ -170,7 +170,7 b' class revlogio(object):'
170 170 def __init__(self):
171 171 self.size = struct.calcsize(indexformatng)
172 172
173 def parseindex(self, fp, data, inline):
173 def parseindex(self, data, inline):
174 174 # call the C implementation to parse the index data
175 175 index, cache = parsers.parse_index2(data, inline)
176 176 return index, None, cache
@@ -264,7 +264,7 b' class revlog(object):'
264 264 self._io = revlogoldio()
265 265 if i:
266 266 try:
267 d = self._io.parseindex(f, i, self._inline)
267 d = self._io.parseindex(i, self._inline)
268 268 except (ValueError, IndexError):
269 269 raise RevlogError(_("index %s is corrupted") % (self.indexfile))
270 270 self.index, n, self._chunkcache = d
General Comments 0
You need to be logged in to leave comments. Login now