Skip to content

Commit b144e80

Browse files
Vladimir Kotalahornace
authored andcommitted
add comments
1 parent c724176 commit b144e80

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,18 @@ Executor getHistoryLogExecutor(File file, String sinceRevision, String tillRevis
209209
// when handling renamed files)
210210
// It is not needed to filter on a branch as 'hg log' will follow
211211
// the active branch.
212-
// TODO: revisit:
213212
// Due to behavior of recent Mercurial versions, it is not possible
214213
// to filter the changesets of a file based on revision.
215214
// For files this does not matter since if getHistory() is called
216215
// for a file, the file has to be renamed so we want its complete history
217216
// if renamed file handling is enabled for this repository.
218-
// TODO: why no reverse() ?
217+
//
218+
// Getting history for individual files should only be done when generating history for renamed files
219+
// so the fact that filtering on sinceRevision does not work does not matter there as history
220+
// from the initial changeset is needed. The tillRevision filtering works.
221+
219222
if (this.isHandleRenamedFiles()) {
223+
// When using --follow, the returned revisions are from newest to oldest, hence no reverse() is needed.
220224
cmd.add("--follow");
221225
}
222226

0 commit comments

Comments
 (0)