Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/Revlog.java @ 385:6150555eb41d
HgInvalidRevisionException for svn imported repositories (changeset 0 references nullid manifest)
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 13 Feb 2012 14:19:36 +0100 |
| parents | 8107b95f4280 |
| children | b015f3918120 |
comparison
equal
deleted
inserted
replaced
| 384:4b97847d0b2d | 385:6150555eb41d |
|---|---|
| 138 * @throws HgInvalidControlFileException if access to revlog index/data entry failed | 138 * @throws HgInvalidControlFileException if access to revlog index/data entry failed |
| 139 */ | 139 */ |
| 140 public final int getRevisionIndex(Nodeid nid) throws HgInvalidControlFileException, HgInvalidRevisionException { | 140 public final int getRevisionIndex(Nodeid nid) throws HgInvalidControlFileException, HgInvalidRevisionException { |
| 141 int revision = content.findRevisionIndex(nid); | 141 int revision = content.findRevisionIndex(nid); |
| 142 if (revision == BAD_REVISION) { | 142 if (revision == BAD_REVISION) { |
| 143 throw new HgInvalidRevisionException(String.format("Bad revision of %s", this /*XXX HgDataFile.getPath might be more suitable here*/), nid, null); | 143 throw new HgInvalidRevisionException(String.format("Can't find revision %s in %s", nid.shortNotation(), this /*FIXME HgDataFile.getPath might be more suitable here*/), nid, null); |
| 144 } | 144 } |
| 145 return revision; | 145 return revision; |
| 146 } | 146 } |
| 147 | 147 |
| 148 /** | 148 /** |
