Mercurial > jhg
diff 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 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgManifest.java Mon Feb 13 13:20:06 2012 +0100 +++ b/src/org/tmatesoft/hg/repo/HgManifest.java Mon Feb 13 14:19:36 2012 +0100 @@ -479,7 +479,12 @@ Nodeid manifest = repo.getChangelog().range(u, u).get(0).manifest(); // FIXME calculate those missing effectively (e.g. cache and sort nodeids to speed lookup // right away in the #next (may refactor ParentWalker's sequential and sorted into dedicated helper and reuse here) - changelog2manifest[u] = repo.getManifest().getRevisionIndex(manifest); + if (manifest.isNull()) { + repo.getContext().getLog().warn(getClass(), "Changeset %d has no associated manifest entry", u); + // keep -1 in the changelog2manifest map. FIXME rest of the code shall accomodate to the fact manifest revision may be missing + } else { + changelog2manifest[u] = repo.getManifest().getRevisionIndex(manifest); + } } catch (HgInvalidControlFileException ex) { // FIXME need to propagate the error up to client repo.getContext().getLog().error(getClass(), ex, null);