[hg] rename pull command execute to executeInCurrentThread

This commit is contained in:
Nadya Zabrodina
2016-03-09 14:29:12 +03:00
parent edf8abccf7
commit 92cef74753
4 changed files with 4 additions and 4 deletions
@@ -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." );