mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg] rename hg Remove Command execution
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user