Skip to content

Commit a66fb4d

Browse files
committed
check revisions
1 parent b7a876c commit a66fb4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/MercurialAnnotationParser.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public void processStream(InputStream input) throws IOException {
7979
// Use the history index hash map to get the author.
8080
String author = Optional.ofNullable(revs.get(fullRev)).map(HistoryEntry::getAuthor).
8181
orElse("N/A");
82-
// TODO: add check that history stored in the index uses the same format of the revision
8382
annotation.addLine(fullRev, Util.getEmail(author.trim()), true, displayRev);
8483
} else {
8584
LOGGER.log(Level.WARNING,

opengrok-indexer/src/test/java/org/opengrok/indexer/history/MercurialRepositoryTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void testAnnotationNegative() throws Exception {
438438
}
439439

440440
private static Stream<Triple<String, List<String>, List<String>>> provideParametersForPositiveAnnotationTest() {
441-
return Stream.of(Triple.of("8:6a8c423f5624", List.of("7", "8"), List.of("7:db1394c05268", "8:6a8c423f5624")),
441+
return Stream.of(Triple.of("8:6a8c423f5624", List.of("7", "8"), List.of("8:6a8c423f5624", "7:db1394c05268")),
442442
Triple.of("7:db1394c05268", List.of("7"), List.of("7:db1394c05268")));
443443
}
444444

@@ -467,6 +467,7 @@ void testAnnotationPositive(Triple<String, List<String>, List<String>> triple) t
467467
collect(Collectors.toList());
468468
assertFalse(relevantEntries.isEmpty());
469469
for (HistoryEntry entry : relevantEntries) {
470+
assertTrue(annotation.getRevisions().contains(entry.getRevision()));
470471
assertEquals(entry.getDescription(), annotation.getDesc(entry.getRevision()));
471472
assertTrue(annotation.getAuthors().contains(Util.getEmail(entry.getAuthor())));
472473
}

0 commit comments

Comments
 (0)