mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-153533 Fixed svn output reading in Windows in interactive mode
This commit is contained in:
+14
@@ -17,6 +17,7 @@ package org.jetbrains.idea.svn.commandLine;
|
||||
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.io.BaseDataReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -37,6 +38,19 @@ public class WinTerminalProcessHandler extends TerminalProcessHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected BaseDataReader createOutputDataReader(@NotNull BaseDataReader.SleepingPolicy sleepingPolicy) {
|
||||
// Currently, when blocking policy is used, reading stops when nothing was actually read (stream ended).
|
||||
// This is an issue for reading output in Windows as redirection to file is used. And so file is actually
|
||||
// empty when first read attempt is performed (thus no output is read at all).
|
||||
// So here we ensure non-blocking policy is used for such cases.
|
||||
sleepingPolicy =
|
||||
useAdaptiveSleepingPolicyWhenReadingOutput() ? new BaseDataReader.AdaptiveSleepingPolicy() : BaseDataReader.SleepingPolicy.SIMPLE;
|
||||
|
||||
return super.createOutputDataReader(sleepingPolicy);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String filterCombinedText(@NotNull String currentLine) {
|
||||
|
||||
Reference in New Issue
Block a user