From 7bcd79b01b78d115349e5db6420a761e7559232f Mon Sep 17 00:00:00 2001 From: Konstantin Kolosovsky Date: Thu, 17 Oct 2019 02:29:52 +0300 Subject: [PATCH] vcs: Do not perform cancellation checks during "after commit" logic (IDEA-223904) GitOrigin-RevId: 9b8db78418229a0e869e29500f82b72e40d7b32b --- .../src/com/intellij/vcs/commit/AbstractCommitter.kt | 7 ++++++- .../src/com/intellij/vcs/commit/LocalChangesCommitter.kt | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/vcs/commit/AbstractCommitter.kt b/platform/vcs-impl/src/com/intellij/vcs/commit/AbstractCommitter.kt index af5003f1da9f..90f1e3d50953 100644 --- a/platform/vcs-impl/src/com/intellij/vcs/commit/AbstractCommitter.kt +++ b/platform/vcs-impl/src/com/intellij/vcs/commit/AbstractCommitter.kt @@ -11,7 +11,6 @@ import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.progress.ProcessCanceledException import com.intellij.openapi.progress.ProgressIndicator import com.intellij.openapi.progress.ProgressManager -import com.intellij.openapi.progress.ProgressManager.progress import com.intellij.openapi.progress.Task import com.intellij.openapi.project.Project import com.intellij.openapi.util.Key @@ -213,5 +212,11 @@ abstract class AbstractCommitter( @JvmStatic fun collectErrors(exceptions: List): List = exceptions.filterNot { it.isWarning } + + internal fun progress(message: String) = + ProgressManager.getInstance().progressIndicator?.apply { + text = message + text2 = "" + } } } \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/vcs/commit/LocalChangesCommitter.kt b/platform/vcs-impl/src/com/intellij/vcs/commit/LocalChangesCommitter.kt index a68dc9752b92..834d9aebada1 100644 --- a/platform/vcs-impl/src/com/intellij/vcs/commit/LocalChangesCommitter.kt +++ b/platform/vcs-impl/src/com/intellij/vcs/commit/LocalChangesCommitter.kt @@ -4,7 +4,6 @@ package com.intellij.vcs.commit import com.intellij.history.LocalHistory import com.intellij.history.LocalHistoryAction import com.intellij.openapi.application.runReadAction -import com.intellij.openapi.progress.ProgressManager.progress import com.intellij.openapi.project.Project import com.intellij.openapi.vcs.VcsBundle.message import com.intellij.openapi.vcs.changes.* @@ -51,7 +50,7 @@ open class LocalChangesCommitter( } } - if (!toRefresh.isEmpty()) { + if (toRefresh.isNotEmpty()) { progress(message("commit.dialog.refresh.files")) RefreshVFsSynchronously.updateChanges(toRefresh) }