equal
deleted
inserted
replaced
458 |
458 |
459 self._io = revlogio() |
459 self._io = revlogio() |
460 if self.version == REVLOGV0: |
460 if self.version == REVLOGV0: |
461 self._io = revlogoldio() |
461 self._io = revlogoldio() |
462 if i: |
462 if i: |
463 d = self._io.parseindex(f, self._inline) |
463 try: |
|
464 d = self._io.parseindex(f, self._inline) |
|
465 except (ValueError, IndexError), e: |
|
466 raise RevlogError(_("index %s is corrupted") % (self.indexfile)) |
464 self.index, self.nodemap, self._chunkcache = d |
467 self.index, self.nodemap, self._chunkcache = d |
465 |
468 |
466 # add the magic null revision at -1 (if it hasn't been done already) |
469 # add the magic null revision at -1 (if it hasn't been done already) |
467 if (self.index == [] or isinstance(self.index, lazyindex) or |
470 if (self.index == [] or isinstance(self.index, lazyindex) or |
468 self.index[-1][7] != nullid) : |
471 self.index[-1][7] != nullid) : |