vcs: Do not perform cancellation checks during "after commit" logic (IDEA-223904)

GitOrigin-RevId: 9b8db78418229a0e869e29500f82b72e40d7b32b
This commit is contained in:
Konstantin Kolosovsky
2019-10-17 00:10:21 +00:00
committed by intellij-monorepo-bot
parent fa7df15fc1
commit 7bcd79b01b
2 changed files with 7 additions and 3 deletions
@@ -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<VcsException>): List<VcsException> = exceptions.filterNot { it.isWarning }
internal fun progress(message: String) =
ProgressManager.getInstance().progressIndicator?.apply {
text = message
text2 = ""
}
}
}
@@ -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)
}