use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class CreateBranchCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameter("branch");
cmd.addParameter("--create-reflog");
if (myTrack) {
cmd.addParameter("--track");
} else {
cmd.addParameter("--no-track");
}
cmd.addParameter(myName);
if (myStartPoint != null) {
cmd.addParameter(myStartPoint);
}
CommandUtil.runCommand(cmd.stdErrExpected(false));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class PushCommandImpl method call.
@Override
public void call() throws VcsException {
final GitCommandLine cmd = getCmd();
cmd.addParameter("push");
if (Loggers.VCS.isDebugEnabled()) {
cmd.addParameter("-v");
}
cmd.addParameter(getRemote());
myRefSpecs.forEach(refSpec -> cmd.addParameter(refSpec));
runCmd(cmd.stdErrLogLevel("debug"));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class UpdateRefCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameter("update-ref");
if (myDelete)
cmd.addParameter("-d");
cmd.addParameter(myRef);
if (myRevision != null)
cmd.addParameter(myRevision);
if (myOldValue != null)
cmd.addParameter(myOldValue);
CommandUtil.runCommand(cmd.stdErrExpected(false));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class VersionCommandImpl method call.
@NotNull
public GitVersion call() throws VcsException {
GitCommandLine cmd = getCmd().repeatOnEmptyOutput(true).stdErrExpected(false);
cmd.addParameter("version");
return GitVersion.parse(CommandUtil.runCommand(cmd, 60).getStdout());
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class LsRemoteCommandImpl method call.
@NotNull
public List<Ref> call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameter("ls-remote");
cmd.addParameter("origin");
return parse(runCmd(cmd.stdErrLogLevel("debug")).getStdout());
}
Aggregations