List<VcsException> (@NotNull List<? extends FilePath> files) { final List<HgFile> filesWithRoots = new ArrayList<>(); for (FilePath filePath : files) { VirtualFile vcsRoot = VcsUtil.getVcsRootFor(myProject, filePath); if (vcsRoot == null) { continue; } filesWithRoots.add(new HgFile(vcsRoot, filePath)); } new Task.Backgroundable(myProject, HgBundle.message("files.removing.progress")) { @Override public void run(@NotNull ProgressIndicator indicator) { new HgRemoveCommand(myProject).executeInCurrentThread(filesWithRoots); } }.queue(); return null; }