From 19e05f007ef831a2c2529fd176918fbb6057378e Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Mon, 10 Oct 2016 00:40:45 +0300 Subject: [PATCH] [hg]: suppress logging output for unknown and ignored file statuses * logging potentially large output may lead to java heap space error --- .../hg4idea/src/org/zmlx/hg4idea/command/HgStatusCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgStatusCommand.java b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgStatusCommand.java index 2ec1c78debbc..a9af7e306bc3 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgStatusCommand.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgStatusCommand.java @@ -168,6 +168,7 @@ public class HgStatusCommand { if (myCleanStatus) { options.add("--clean"); } + executor.setOutputAlwaysSuppressed(myCleanStatus || myIncludeUnknown || myIncludeIgnored); if (myBaseRevision != null && (!myBaseRevision.getRevision().isEmpty() || !myBaseRevision.getChangeset().isEmpty())) { options.add("--rev"); options.add(StringUtil.isEmptyOrSpaces(myBaseRevision.getChangeset()) ? myBaseRevision.getRevision() : myBaseRevision.getChangeset()); @@ -202,7 +203,7 @@ public class HgStatusCommand { return changes; } List errors = result.getErrorLines(); - if (errors != null && !errors.isEmpty()) { + if (!errors.isEmpty()) { if (result.getExitValue() != 0 && !myProject.isDisposed()) { String title = "Could not execute hg status command "; LOG.warn(title + errors.toString());