From b9b477c1bac146163689fe4bc7516292a9c2c920 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 23 Nov 2011 13:18:11 +0300 Subject: [PATCH] IDEA-77414 Fix Git pull hang: don't fire new Task under the Task.Modal, just execute synchronously. --- plugins/git4idea/src/git4idea/actions/GitPull.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/src/git4idea/actions/GitPull.java b/plugins/git4idea/src/git4idea/actions/GitPull.java index c5c475bd3b87..8c0e88b435b7 100644 --- a/plugins/git4idea/src/git4idea/actions/GitPull.java +++ b/plugins/git4idea/src/git4idea/actions/GitPull.java @@ -68,7 +68,7 @@ public class GitPull extends GitRepositoryAction { final Label beforeLabel = LocalHistory.getInstance().putSystemLabel(project, "Before update"); final AtomicReference handlerReference = new AtomicReference(); - new Task.Modal(project, GitBundle.message("pulling.title", dialog.getRemote()), false) { + new Task.Modal(project, GitBundle.message("pulling.title", dialog.getRemote()), true) { @Override public void run(@NotNull ProgressIndicator indicator) { GitRepository repository = GitRepositoryManager.getInstance(project).getRepositoryForRoot(dialog.gitRoot()); @@ -103,8 +103,9 @@ public class GitPull extends GitRepositoryAction { final GitRevisionNumber currentRev = new GitRevisionNumber(revision); GitTask pullTask = new GitTask(project, handlerReference.get(), GitBundle.message("pulling.title", dialog.getRemote())); + pullTask.setProgressIndicator(indicator); pullTask.setProgressAnalyzer(new GitStandardProgressAnalyzer()); - pullTask.executeModal(new GitTaskResultHandlerAdapter() { + pullTask.execute(true, false, new GitTaskResultHandlerAdapter() { @Override protected void onSuccess() { GitMergeUtil.showUpdates(GitPull.this, project, exceptions, root, currentRev, beforeLabel, getActionName(), ActionInfo.UPDATE);