Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgManifest.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 | 155c1893bda4 |
| children | 6952d9ce97f1 |
comparison
equal
deleted
inserted
replaced
| 384:4b97847d0b2d | 385:6150555eb41d |
|---|---|
| 477 for (int u : undefinedChangelogRevision) { | 477 for (int u : undefinedChangelogRevision) { |
| 478 try { | 478 try { |
| 479 Nodeid manifest = repo.getChangelog().range(u, u).get(0).manifest(); | 479 Nodeid manifest = repo.getChangelog().range(u, u).get(0).manifest(); |
| 480 // FIXME calculate those missing effectively (e.g. cache and sort nodeids to speed lookup | 480 // FIXME calculate those missing effectively (e.g. cache and sort nodeids to speed lookup |
| 481 // right away in the #next (may refactor ParentWalker's sequential and sorted into dedicated helper and reuse here) | 481 // right away in the #next (may refactor ParentWalker's sequential and sorted into dedicated helper and reuse here) |
| 482 changelog2manifest[u] = repo.getManifest().getRevisionIndex(manifest); | 482 if (manifest.isNull()) { |
| 483 repo.getContext().getLog().warn(getClass(), "Changeset %d has no associated manifest entry", u); | |
| 484 // keep -1 in the changelog2manifest map. FIXME rest of the code shall accomodate to the fact manifest revision may be missing | |
| 485 } else { | |
| 486 changelog2manifest[u] = repo.getManifest().getRevisionIndex(manifest); | |
| 487 } | |
| 483 } catch (HgInvalidControlFileException ex) { | 488 } catch (HgInvalidControlFileException ex) { |
| 484 // FIXME need to propagate the error up to client | 489 // FIXME need to propagate the error up to client |
| 485 repo.getContext().getLog().error(getClass(), ex, null); | 490 repo.getContext().getLog().error(getClass(), ex, null); |
| 486 } | 491 } |
| 487 } | 492 } |
