Merge branch 'svn_18_2'

This commit is contained in:
Konstantin Kolosovsky
2013-11-13 00:27:08 +04:00
2 changed files with 5 additions and 6 deletions
@@ -205,7 +205,7 @@ public class CommandExecutor {
}
}
private boolean checkCancelled() {
public boolean checkCancelled() {
if (!myWasCancelled && myCommand.getCanceller() != null) {
try {
myCommand.getCanceller().checkCancelled();
@@ -219,10 +219,6 @@ public class CommandExecutor {
return myWasCancelled;
}
public boolean wasCancelled() {
return myWasCancelled;
}
public void destroyProcess() {
synchronized (myLock) {
myNeedsDestroy = true;
@@ -106,7 +106,10 @@ public class CommandRuntime {
final String errText = executor.getErrorOutput().trim();
final AuthCallbackCase callback = executor instanceof TerminalExecutor ? null : createCallback(errText, command.getRepositoryUrl());
// do not handle possible authentication errors if command was manually cancelled
if (!executor.wasCancelled() && callback != null) {
// force checking if command is cancelled and not just use corresponding value from executor - as there could be cases when command
// finishes quickly but with some auth error - this way checkCancelled() is not called by executor itself and so command is repeated
// "infinite" times despite it was cancelled.
if (!executor.checkCancelled() && callback != null) {
if (callback.getCredentials(errText)) {
if (myAuthCallback.getSpecialConfigDir() != null) {
command.setConfigDir(myAuthCallback.getSpecialConfigDir());