mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg] rename pull command execute to executeInCurrentThread
This commit is contained in:
@@ -46,7 +46,7 @@ public class HgPullAction extends HgAbstractGlobalSingleRepoAction {
|
||||
private static void executePull(final Project project, final HgRepository hgRepository, final String source) {
|
||||
final HgPullCommand command = new HgPullCommand(project, hgRepository.getRoot());
|
||||
command.setSource(source);
|
||||
command.execute();
|
||||
command.executeInCurrentThread();
|
||||
hgRepository.update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class HgPullCommand {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public HgCommandExitCode execute() {
|
||||
public HgCommandExitCode executeInCurrentThread() {
|
||||
List<String> arguments = new LinkedList<String>();
|
||||
if (update) {
|
||||
arguments.add("--update");
|
||||
|
||||
@@ -265,7 +265,7 @@ public class HgRegularUpdater implements HgUpdater {
|
||||
HgPullCommand hgPullCommand = new HgPullCommand(project, repo);
|
||||
final String defaultPath = HgUtil.getRepositoryDefaultPath(project, repo);
|
||||
hgPullCommand.setSource(defaultPath);
|
||||
return hgPullCommand.execute();
|
||||
return hgPullCommand.executeInCurrentThread();
|
||||
}
|
||||
|
||||
private void update(@NotNull VirtualFile repo, ProgressIndicator indicator, UpdatedFiles updatedFiles, List<VcsException> warnings) throws VcsException {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class HgUpdateTest extends HgCollaborativeTest {
|
||||
//do a simple pull without an update
|
||||
HgPullCommand pull = new HgPullCommand(myProject, projectRepoVirtualFile);
|
||||
pull.setSource(HgUtil.getRepositoryDefaultPath(myProject, projectRepoVirtualFile));
|
||||
pull.execute();
|
||||
pull.executeInCurrentThread();
|
||||
|
||||
assertEquals( determineNumberOfIncomingChanges( projectRepo ), 0,
|
||||
"The update operation should have pulled the incoming changes from the default repository." );
|
||||
|
||||
Reference in New Issue
Block a user