diff --git a/platform/platform-resources/src/META-INF/VcsExtensions.xml b/platform/platform-resources/src/META-INF/VcsExtensions.xml index da32cea0a49e..a9b1ab4b9905 100644 --- a/platform/platform-resources/src/META-INF/VcsExtensions.xml +++ b/platform/platform-resources/src/META-INF/VcsExtensions.xml @@ -119,6 +119,7 @@ + diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitHelper.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitHelper.java index c163b6485799..ab2d2017bf29 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitHelper.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitHelper.java @@ -37,7 +37,6 @@ import com.intellij.openapi.vcs.changes.actions.MoveChangesToAnotherListAction; import com.intellij.openapi.vcs.changes.committed.CommittedChangesCache; import com.intellij.openapi.vcs.checkin.CheckinEnvironment; import com.intellij.openapi.vcs.checkin.CheckinHandler; -import com.intellij.openapi.vcs.impl.LineStatusTrackerManager; import com.intellij.openapi.vcs.update.RefreshVFsSynchronously; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.ExceptionUtil; @@ -139,7 +138,6 @@ public class CommitHelper { delegateCommitToVcsThread(); } finally { - LineStatusTrackerManager.getInstanceImpl(myProject).resetExcludedFromCommitMarkers(); vcsManager.stopBackgroundVcsOperation(); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/LineStatusTrackerManager.kt b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/LineStatusTrackerManager.kt index 363c3d5aa36f..aafce538bbed 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/LineStatusTrackerManager.kt +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/LineStatusTrackerManager.kt @@ -50,6 +50,8 @@ import com.intellij.openapi.vcs.* import com.intellij.openapi.vcs.changes.* import com.intellij.openapi.vcs.changes.conflicts.ChangelistConflictFileStatusProvider import com.intellij.openapi.vcs.changes.ui.ChangesViewContentManager +import com.intellij.openapi.vcs.checkin.CheckinHandler +import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory import com.intellij.openapi.vcs.ex.LineStatusTracker import com.intellij.openapi.vcs.ex.PartialLocalLineStatusTracker import com.intellij.openapi.vcs.ex.SimpleLocalLineStatusTracker @@ -711,6 +713,24 @@ class LineStatusTrackerManager( } } + class CheckinFactory : CheckinHandlerFactory() { + override fun createHandler(panel: CheckinProjectPanel, commitContext: CommitContext): CheckinHandler { + return object : CheckinHandler() { + override fun checkinSuccessful() { + runInEdt { + getInstanceImpl(panel.project).resetExcludedFromCommitMarkers() + } + } + + override fun checkinFailed(exception: MutableList?) { + runInEdt { + getInstanceImpl(panel.project).resetExcludedFromCommitMarkers() + } + } + } + } + } + private fun shouldBeUpdated(oldInfo: ContentInfo?, newInfo: ContentInfo): Boolean { if (oldInfo == null) return true