[hg]: suppress logging output for unknown and ignored file statuses

* logging potentially large output may lead to java heap space error
This commit is contained in:
Nadya Zabrodina
2016-10-10 00:55:13 +03:00
parent 96e98f66ee
commit 19e05f007e
@@ -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<String> 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());