use of org.zmlx.hg4idea.execution.HgRemoteCommandExecutor in project intellij-community by JetBrains.
the class HgPushCommand method executeInCurrentThread.
public HgCommandResult executeInCurrentThread() {
final List<String> arguments = new LinkedList<>();
if (!StringUtil.isEmptyOrSpaces(myRevision)) {
arguments.add("-r");
arguments.add(myRevision);
}
if (myBranchName != null) {
arguments.add("-b");
arguments.add(myBranchName);
}
if (myIsNewBranch) {
arguments.add("--new-branch");
}
if (!StringUtil.isEmptyOrSpaces(myBookmarkName)) {
arguments.add("-B");
arguments.add(myBookmarkName);
}
if (myForce) {
arguments.add("-f");
}
arguments.add(myDestination);
final HgRemoteCommandExecutor executor = new HgRemoteCommandExecutor(myProject, myDestination);
executor.setShowOutput(true);
HgCommandResult result = executor.executeInCurrentThread(myRepo, "push", arguments);
myProject.getMessageBus().syncPublisher(HgVcs.REMOTE_TOPIC).update(myProject, null);
return result;
}
Aggregations