Show More
@@ -143,6 +143,9 b' class revlogoldio(object):' | |||||
143 | nodemap[e[6]] = n |
|
143 | nodemap[e[6]] = n | |
144 | n += 1 |
|
144 | n += 1 | |
145 |
|
145 | |||
|
146 | # add the magic null revision at -1 | |||
|
147 | index.append((0, 0, 0, -1, -1, -1, -1, nullid)) | |||
|
148 | ||||
146 | return index, nodemap, None |
|
149 | return index, nodemap, None | |
147 |
|
150 | |||
148 | def packentry(self, entry, node, version, rev): |
|
151 | def packentry(self, entry, node, version, rev): | |
@@ -262,20 +265,15 b' class revlog(object):' | |||||
262 | self._io = revlogio() |
|
265 | self._io = revlogio() | |
263 | if self.version == REVLOGV0: |
|
266 | if self.version == REVLOGV0: | |
264 | self._io = revlogoldio() |
|
267 | self._io = revlogoldio() | |
265 |
|
|
268 | try: | |
266 | try: |
|
269 | d = self._io.parseindex(i, self._inline) | |
267 | d = self._io.parseindex(i, self._inline) |
|
270 | except (ValueError, IndexError): | |
268 | except (ValueError, IndexError): |
|
271 | raise RevlogError(_("index %s is corrupted") % (self.indexfile)) | |
269 | raise RevlogError(_("index %s is corrupted") % (self.indexfile)) |
|
272 | self.index, n, self._chunkcache = d | |
270 | self.index, n, self._chunkcache = d |
|
273 | if n: | |
271 |
|
|
274 | self.nodemap = n | |
272 | self.nodemap = n |
|
275 | if not self._chunkcache: | |
273 |
|
|
276 | self._chunkclear() | |
274 | self._chunkclear() |
|
|||
275 |
|
||||
276 | # add the magic null revision at -1 (if it hasn't been done already) |
|
|||
277 | if self.index == [] or self.index[-1][7] != nullid: |
|
|||
278 | self.index.append((0, 0, 0, -1, -1, -1, -1, nullid)) |
|
|||
279 |
|
277 | |||
280 | @util.propertycache |
|
278 | @util.propertycache | |
281 | def nodemap(self): |
|
279 | def nodemap(self): |
General Comments 0
You need to be logged in to leave comments.
Login now