From 1ac0355767a4bfa6264e46fcd96305442946a53c Mon Sep 17 00:00:00 2001 From: Konstantin Nisht Date: Mon, 25 Mar 2024 15:20:19 +0100 Subject: [PATCH] [warmup] Move git log indexing command to git module GitOrigin-RevId: 62c33889255b133da1824a462daced8797e5700f --- .../src/com/intellij/warmup/WarmupCommandProvider.kt | 1 - .../commandDescriptions/checkGitLogIndexedCommand.html | 0 .../performanceTesting}/CheckGitLogIndexedCommand.kt | 7 ++++++- .../git4idea/performanceTesting/GitCommandProvider.java | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) rename {platform/warmup/performanceTesting => plugins/git4idea}/resources/commandDescriptions/checkGitLogIndexedCommand.html (100%) rename {platform/warmup/performanceTesting/src/com/intellij/warmup => plugins/git4idea/src/git4idea/performanceTesting}/CheckGitLogIndexedCommand.kt (95%) diff --git a/platform/warmup/performanceTesting/src/com/intellij/warmup/WarmupCommandProvider.kt b/platform/warmup/performanceTesting/src/com/intellij/warmup/WarmupCommandProvider.kt index b0899f9fc75d..0f56f57d1ac1 100644 --- a/platform/warmup/performanceTesting/src/com/intellij/warmup/WarmupCommandProvider.kt +++ b/platform/warmup/performanceTesting/src/com/intellij/warmup/WarmupCommandProvider.kt @@ -7,6 +7,5 @@ import com.jetbrains.performancePlugin.CreateCommand class WarmupCommandProvider : CommandProvider { override fun getCommands() : Map = mapOf( Pair(BUILD_PREFIX, CreateCommand(::CheckWarmupBuildStatusCommand)), - Pair(GIT_LOG_PREFIX, CreateCommand(::CheckGitLogIndexedCommand)), ) } \ No newline at end of file diff --git a/platform/warmup/performanceTesting/resources/commandDescriptions/checkGitLogIndexedCommand.html b/plugins/git4idea/resources/commandDescriptions/checkGitLogIndexedCommand.html similarity index 100% rename from platform/warmup/performanceTesting/resources/commandDescriptions/checkGitLogIndexedCommand.html rename to plugins/git4idea/resources/commandDescriptions/checkGitLogIndexedCommand.html diff --git a/platform/warmup/performanceTesting/src/com/intellij/warmup/CheckGitLogIndexedCommand.kt b/plugins/git4idea/src/git4idea/performanceTesting/CheckGitLogIndexedCommand.kt similarity index 95% rename from platform/warmup/performanceTesting/src/com/intellij/warmup/CheckGitLogIndexedCommand.kt rename to plugins/git4idea/src/git4idea/performanceTesting/CheckGitLogIndexedCommand.kt index 899f523130a1..6f6538d35f14 100644 --- a/platform/warmup/performanceTesting/src/com/intellij/warmup/CheckGitLogIndexedCommand.kt +++ b/plugins/git4idea/src/git4idea/performanceTesting/CheckGitLogIndexedCommand.kt @@ -1,5 +1,5 @@ // Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -package com.intellij.warmup +package git4idea.performanceTesting import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.serviceIfCreated @@ -17,6 +17,11 @@ import org.jetbrains.concurrency.toPromise * Checks that VCS log is fully indexed on project closing */ class CheckGitLogIndexedCommand(text: String, line: Int) : AbstractCommand(text, line) { + + companion object { + const val PREFIX = CMD_PREFIX + "checkGitLogIndexing" + } + override fun _execute(context: PlaybackContext): Promise { val callback = assertVcsLogIndexed() diff --git a/plugins/git4idea/src/git4idea/performanceTesting/GitCommandProvider.java b/plugins/git4idea/src/git4idea/performanceTesting/GitCommandProvider.java index e1fe71ba3b64..19b8fe34e0fd 100644 --- a/plugins/git4idea/src/git4idea/performanceTesting/GitCommandProvider.java +++ b/plugins/git4idea/src/git4idea/performanceTesting/GitCommandProvider.java @@ -16,7 +16,8 @@ public final class GitCommandProvider implements CommandProvider { Map.entry(GitCommitCommand.PREFIX, GitCommitCommand::new), Map.entry(FilterVcsLogTabCommand.PREFIX, FilterVcsLogTabCommand::new), Map.entry(GitShowVcsWidgetCommand.PREFIX, GitShowVcsWidgetCommand::new), - Map.entry(ShowFileAnnotationCommand.PREFIX, ShowFileAnnotationCommand::new) + Map.entry(ShowFileAnnotationCommand.PREFIX, ShowFileAnnotationCommand::new), + Map.entry(CheckGitLogIndexedCommand.PREFIX, CheckGitLogIndexedCommand::new) ); } }