diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java b/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java index 44a186947467..8898bf29f215 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java @@ -198,21 +198,25 @@ public final class HgCommandExecutor { } // log output if needed - if (!myIsSilent && myShowOutput) { - LOG.info(result.getRawOutput()); - myVcs.showMessageInConsole(result.getRawOutput(), ConsoleViewContentType.SYSTEM_OUTPUT.getAttributes()); - } - else { - LOG.debug(result.getRawOutput()); + if (!result.getRawOutput().isEmpty()) { + if (!myIsSilent && myShowOutput) { + LOG.info(result.getRawOutput()); + myVcs.showMessageInConsole(result.getRawOutput(), ConsoleViewContentType.SYSTEM_OUTPUT.getAttributes()); + } + else { + LOG.debug(result.getRawOutput()); + } } // log error - if (!myIsSilent) { - LOG.info(result.getRawError()); - myVcs.showMessageInConsole(result.getRawError(), ConsoleViewContentType.ERROR_OUTPUT.getAttributes()); - } - else { - LOG.debug(result.getRawError()); + if (!result.getRawError().isEmpty()) { + if (!myIsSilent) { + LOG.info(result.getRawError()); + myVcs.showMessageInConsole(result.getRawError(), ConsoleViewContentType.ERROR_OUTPUT.getAttributes()); + } + else { + LOG.debug(result.getRawError()); + } } }