Mercurial > hg-stable
changeset 13264:8439526fb407
revlog/parseindex: no need to pass the file around
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 15 Jan 2011 15:04:58 +0100 |
parents | c45b5faa6213 |
children | 04b302ce2781 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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