Search in sources :

Example 11 with UpdatedFiles

use of com.intellij.openapi.vcs.update.UpdatedFiles in project intellij-community by JetBrains.

the class GitPushResultNotificationTest method notification.

private GitPushResultNotification notification(Map<GitRepository, GitPushRepoResult> map) {
    boolean wasUpdatePerformed = ContainerUtil.exists(map.values(), aNew -> aNew.getUpdateResult() != null);
    UpdatedFiles updatedFiles = UpdatedFiles.create();
    if (wasUpdatePerformed) {
        updatedFiles.getTopLevelGroups().get(0).add("file.txt", "Git", null);
    }
    return GitPushResultNotification.create(myProject, new GitPushResult(map, updatedFiles, null, null), map.size() > 1);
}
Also used : UpdatedFiles(com.intellij.openapi.vcs.update.UpdatedFiles)

Aggregations

UpdatedFiles (com.intellij.openapi.vcs.update.UpdatedFiles)11 VirtualFile (com.intellij.openapi.vfs.VirtualFile)6 EmptyProgressIndicator (com.intellij.openapi.progress.EmptyProgressIndicator)4 UpdateSession (com.intellij.openapi.vcs.update.UpdateSession)3 Project (com.intellij.openapi.project.Project)2 VcsException (com.intellij.openapi.vcs.VcsException)2 NotificationGroup (com.intellij.notification.NotificationGroup)1 NotificationType (com.intellij.notification.NotificationType)1 ProjectLevelVcsManagerEx (com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx)1 UpdateInfoTree (com.intellij.openapi.vcs.update.UpdateInfoTree)1 GitVcs (git4idea.GitVcs)1 GitRepository (git4idea.repo.GitRepository)1 GitUpdateResult (git4idea.update.GitUpdateResult)1 ArrayList (java.util.ArrayList)1 NotNull (org.jetbrains.annotations.NotNull)1 HgCommandResultNotifier (org.zmlx.hg4idea.action.HgCommandResultNotifier)1 HgCommitCommand (org.zmlx.hg4idea.command.HgCommitCommand)1 HgGraftCommand (org.zmlx.hg4idea.command.HgGraftCommand)1 HgCommandException (org.zmlx.hg4idea.execution.HgCommandException)1 HgCommandResult (org.zmlx.hg4idea.execution.HgCommandResult)1