Skip to content

Commit d55b51d

Browse files
Vladimir Kotalahornace
Vladimir Kotal
authored andcommitted
add comments
1 parent b20747d commit d55b51d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ History parse(File file, String sinceRevision, String tillRevision) throws Histo
9999
repository.removeAndVerifyOldestChangeset(entries, sinceRevision);
100100
}
101101

102-
// TODO: add comment
102+
// See getHistoryLogExecutor() for explanation.
103103
if (repository.isHandleRenamedFiles() && file.isFile() && tillRevision != null) {
104104
removeChangesets(entries, tillRevision);
105105
}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ Executor getHistoryLogExecutor(File file, String sinceRevision, String tillRevis
224224
// Getting history for individual files should only be done when generating history for renamed files
225225
// so the fact that filtering on sinceRevision does not work does not matter there as history
226226
// from the initial changeset is needed. The tillRevision filtering works however not
227-
// in combination with --follow.
227+
// in combination with --follow so the filtering is done in MercurialHistoryParser.parse().
228+
// Even if the revision filtering worked, this approach would be probably faster and consumed less memory.
228229
if (this.isHandleRenamedFiles()) {
229230
// When using --follow, the returned revisions are from newest to oldest, hence no reverse() is needed.
230231
cmd.add("--follow");

0 commit comments

Comments
 (0)