if (changelog2manifest == null) {
// direct, 1-1 mapping of changeset indexes to manifest
return;
}
// I assume there'd be not too many revisions we don't know manifest of
IntVector undefinedChangelogRevision = new IntVector();
for (int i = 0; i < changelog2manifest.length; i++) {
if (changelog2manifest[i] == BAD_REVISION) {
undefinedChangelogRevision.add(i);
}
}
if (undefinedChangelogRevision.size() > 0) {
final IntMap<Nodeid> missingCsetToManifest = new IntMap<Nodeid>(undefinedChangelogRevision.size());
int[] undefinedClogRevs = undefinedChangelogRevision.toArray();
// undefinedChangelogRevision is sorted by the nature it's created
HgManifest.this.getRepo().getChangelog().rangeInternal(new HgChangelog.Inspector() {
public void next(int revisionIndex, Nodeid nodeid, RawChangeset cset) {
missingCsetToManifest.put(revisionIndex, cset.manifest());
}
}, undefinedClogRevs);
assert missingCsetToManifest.size() == undefinedChangelogRevision.size();
for (int u : undefinedClogRevs) {
Nodeid manifest = missingCsetToManifest.get(u);
if (manifest == null || manifest.isNull()) {
HgManifest.this.getRepo().getSessionContext().getLog().dump(getClass(), Severity.Warn, "Changeset %d has no associated manifest entry", u);
// keep BAD_REVISION in the changelog2manifest map.