for (int taggedRevision : tagLocalRevs) {
// current file revision can't appear in tags that point to earlier changelog revisions (they got own file revision)
if (taggedRevision >= changesetRevisionIndex) {
// z points to some changeset with tag
Nodeid wasKnownAs = fileRevisionAtTagRevision.get(taggedRevision);
if (wasKnownAs.equals(fileRevision)) {
// has tag associated with changeset at index z
List<TagInfo> tagsAtRev = tagRevIndex2TagInfo.get(taggedRevision);
assert tagsAtRev != null;
for (TagInfo ti : tagsAtRev) {
associatedTags.add(ti.name());
}
}
}
}
//
System.out.printf("%3d%7d%s\n", fileRevisionIndex, changesetRevisionIndex, associatedTags);
}
});
for (int i = 0, lastRev = fileNode.getLastRevision(); i <= lastRev; i++) {
Nodeid fileRevision = fileNode.getRevision(i);
List<String> associatedTags2 = fileRev2TagNames.get(fileRevision);
int changesetRevIndex = fileNode.getChangesetRevisionIndex(i);
System.out.printf("%3d%7d%s\n", i, changesetRevIndex, associatedTags2 == null ? Collections.emptyList() : associatedTags2);
}
System.out.printf("Alternative total time: %d ms, of that init: %d ms\n", (System.nanoTime() - start2)/1000000, (start2a-start2)/1000000);