[hg] rename hg Remove Command execution

This commit is contained in:
Nadya Zabrodina
2016-03-09 14:29:16 +03:00
parent 9ca3f1de01
commit 1844804f0e
4 changed files with 7 additions and 8 deletions
@@ -301,7 +301,7 @@ public class HgVFSListener extends VcsVFSListener {
}
if (!deletes.isEmpty()) {
new HgRemoveCommand(myProject).execute(deletes);
new HgRemoveCommand(myProject).executeInCurrentThread(deletes);
}
for (HgFile file : deletes) {
@@ -37,15 +37,15 @@ public class HgRemoveCommand {
* Removes given files from their Mercurial repositories.
* @param hgFiles files to be removed.
*/
public void execute(@NotNull HgFile... hgFiles) {
execute(Arrays.asList(hgFiles));
public void executeInCurrentThread(@NotNull HgFile... hgFiles) {
executeInCurrentThread(Arrays.asList(hgFiles));
}
/**
* Removes given files from their Mercurial repositories.
* @param hgFiles files to be removed.
*/
public void execute(@NotNull Collection<HgFile> hgFiles) {
public void executeInCurrentThread(@NotNull Collection<HgFile> hgFiles) {
for( Map.Entry<VirtualFile, List<String>> entry : HgUtil.getRelativePathsByRepository(hgFiles).entrySet()) {
List<String> filePaths = entry.getValue();
for (List<String> chunkFiles : VcsFileUtil.chunkArguments(filePaths)) {
@@ -222,11 +222,10 @@ public class HgCheckinEnvironment implements CheckinEnvironment {
}
filesWithRoots.add(new HgFile(vcsRoot, filePath));
}
new Task.Backgroundable(myProject, "Removing files...") {
new Task.Backgroundable(myProject, "Removing Files...") {
@Override
public void run(@NotNull ProgressIndicator indicator) {
HgRemoveCommand command = new HgRemoveCommand(myProject);
command.execute(filesWithRoots);
new HgRemoveCommand(myProject).executeInCurrentThread(filesWithRoots);
}
}.queue();
return null;
@@ -192,7 +192,7 @@ public abstract class HgUtil {
if (vcsRoot == null) {
continue;
}
command.execute(new HgFile(vcsRoot, filePath));
command.executeInCurrentThread(new HgFile(vcsRoot, filePath));
}
}