From 4419260e130d9bc5753d58d1fd517c9982009ba5 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 17 Nov 2010 14:25:32 +0300 Subject: [PATCH] Git push active branches: run in the common git queue. --- .../git4idea/checkin/GitPushActiveBranchesDialog.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java b/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java index 8c8cb7328b1f..53d764059973 100644 --- a/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java +++ b/plugins/git4idea/src/git4idea/checkin/GitPushActiveBranchesDialog.java @@ -20,7 +20,6 @@ import com.intellij.notification.NotificationType; import com.intellij.notification.Notifications; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; -import com.intellij.openapi.progress.BackgroundTaskQueue; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.Task; @@ -85,8 +84,7 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { private JRadioButton myStashRadioButton; // Save files policy option private JRadioButton myShelveRadioButton; - - private BackgroundTaskQueue myTaskQueue; + private GitVcs myVcs; /** * A modification of Runnable with the roots-parameter. @@ -104,9 +102,9 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { */ private GitPushActiveBranchesDialog(final Project project, List vcsRoots, List roots) { super(project, true); + myVcs = GitVcs.getInstance(project); myProject = project; myVcsRoots = vcsRoots; - myTaskQueue = new BackgroundTaskQueue(myProject, "Update and Push operations..."); updateTree(roots, null); updateUI(); @@ -244,7 +242,7 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { } } }; - myTaskQueue.run(rebaseAndPushTask); + myVcs.runInBackground(rebaseAndPushTask); } /** @@ -735,7 +733,7 @@ public class GitPushActiveBranchesDialog extends DialogWrapper { } } }; - myTaskQueue.run(fetchTask); + myVcs.runInBackground(fetchTask); } /**