Skip to content

Commit 2c632b9

Browse files
Vladimir Kotalahornace
authored andcommitted
log sinceRevision on error
1 parent c18ef63 commit 2c632b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.io.IOException;
3030
import java.io.InputStream;
3131
import java.io.InputStreamReader;
32+
import java.nio.charset.StandardCharsets;
3233
import java.util.function.Consumer;
3334

3435
class MercurialHistoryParserRevisionsOnly implements Executor.StreamHandler {
@@ -46,9 +47,9 @@ void parse(File file, String sinceRevision) throws HistoryException {
4647
int status = executor.exec(true, this);
4748

4849
if (status != 0) {
49-
throw new HistoryException("Failed to get revisions for: \"" +
50-
file.getAbsolutePath() +
51-
"\" Exit code: " + status); // TODO log sinceRevision
50+
throw new HistoryException(
51+
String.format("Failed to get revisions for: \"%s\" since revision %s Exit code: %d",
52+
file.getAbsolutePath(), sinceRevision, status));
5253
}
5354
} catch (IOException e) {
5455
throw new HistoryException("Failed to get history for: \"" +

0 commit comments

Comments
 (0)