Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/RevlogStream.java @ 440:299870249a28
Issue 30: bogus IOException for mmap file on linux
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 19 Apr 2012 19:18:25 +0200 |
parents | 48f993aa2f41 |
children | 1ee452f31187 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RevlogStream.java Thu Apr 19 19:17:31 2012 +0200 +++ b/src/org/tmatesoft/hg/internal/RevlogStream.java Thu Apr 19 19:18:25 2012 +0200 @@ -119,7 +119,7 @@ int actualLen = daIndex.readInt(); return actualLen; } catch (IOException ex) { - throw new HgInvalidControlFileException(null, ex, indexFile); + throw new HgInvalidControlFileException(null, ex, indexFile).setRevisionIndex(revisionIndex); } finally { daIndex.done(); } @@ -141,7 +141,7 @@ daIndex.readBytes(rv, 0, 20); return rv; } catch (IOException ex) { - throw new HgInvalidControlFileException(null, ex, indexFile); + throw new HgInvalidControlFileException("Revision lookup failed", ex, indexFile).setRevisionIndex(revisionIndex); } finally { daIndex.done(); } @@ -162,7 +162,7 @@ int linkRev = daIndex.readInt(); return linkRev; } catch (IOException ex) { - throw new HgInvalidControlFileException(null, ex, indexFile); + throw new HgInvalidControlFileException("Linked revision lookup failed", ex, indexFile).setRevisionIndex(revisionIndex); } finally { daIndex.done(); } @@ -193,7 +193,7 @@ daIndex.skip(inline ? 12 + compressedLen : 12); } } catch (IOException ex) { - throw new HgInvalidControlFileException("Failed", ex, indexFile).setRevision(nodeid); + throw new HgInvalidControlFileException("Revision lookup failed", ex, indexFile).setRevision(nodeid); } finally { daIndex.done(); }