Search in sources :

Example 1 with HgRemoveCommand

use of org.zmlx.hg4idea.command.HgRemoveCommand in project intellij-community by JetBrains.

the class HgUtil method removeFilesFromVcs.

/**
   * Calls 'hg remove' to remove given files from the VCS.
   * @param project
   * @param files files to be removed from the VCS.
   */
public static void removeFilesFromVcs(Project project, List<FilePath> files) {
    final HgRemoveCommand command = new HgRemoveCommand(project);
    for (FilePath filePath : files) {
        final VirtualFile vcsRoot = VcsUtil.getVcsRootFor(project, filePath);
        if (vcsRoot == null) {
            continue;
        }
        command.executeInCurrentThread(new HgFile(vcsRoot, filePath));
    }
}
Also used : HgRemoveCommand(org.zmlx.hg4idea.command.HgRemoveCommand) FilePath(com.intellij.openapi.vcs.FilePath) VirtualFile(com.intellij.openapi.vfs.VirtualFile) VcsVirtualFile(com.intellij.openapi.vcs.vfs.VcsVirtualFile) AbstractVcsVirtualFile(com.intellij.openapi.vcs.vfs.AbstractVcsVirtualFile)

Aggregations

FilePath (com.intellij.openapi.vcs.FilePath)1 AbstractVcsVirtualFile (com.intellij.openapi.vcs.vfs.AbstractVcsVirtualFile)1 VcsVirtualFile (com.intellij.openapi.vcs.vfs.VcsVirtualFile)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 HgRemoveCommand (org.zmlx.hg4idea.command.HgRemoveCommand)1