diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/HgVFSListener.java b/plugins/hg4idea/src/org/zmlx/hg4idea/HgVFSListener.java index fd14558b21c9..4d166c8cd66b 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/HgVFSListener.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/HgVFSListener.java @@ -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) { diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgRemoveCommand.java b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgRemoveCommand.java index 9ccdbac32b0b..36c958f892a5 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgRemoveCommand.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgRemoveCommand.java @@ -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 hgFiles) { + public void executeInCurrentThread(@NotNull Collection hgFiles) { for( Map.Entry> entry : HgUtil.getRelativePathsByRepository(hgFiles).entrySet()) { List filePaths = entry.getValue(); for (List chunkFiles : VcsFileUtil.chunkArguments(filePaths)) { diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/commit/HgCheckinEnvironment.java b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/commit/HgCheckinEnvironment.java index 3fc5a72b000d..846b435a62eb 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/commit/HgCheckinEnvironment.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/commit/HgCheckinEnvironment.java @@ -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; diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java b/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java index f8d6b02c850a..a2b209c2149a 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java @@ -192,7 +192,7 @@ public abstract class HgUtil { if (vcsRoot == null) { continue; } - command.execute(new HgFile(vcsRoot, filePath)); + command.executeInCurrentThread(new HgFile(vcsRoot, filePath)); } }