use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class GcCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameter("gc");
CommandUtil.runCommand(cmd);
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class InitCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameter("init");
if (myBare)
cmd.addParameter("--bare");
if (!cmd.getGitVersion().isLessThan(UpdaterImpl.GIT_INIT_STDERR_DEFAULT_BRANCH_HINT)) {
// TW-69468
cmd.addParameter("--initial-branch=" + INITIAL_BRANCH);
}
CommandUtil.runCommand(cmd.stdErrExpected(false));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class AddRemoteCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameters("remote", "add", myName, myUrl);
CommandUtil.runCommand(cmd.stdErrExpected(false));
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class CleanCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameters("clean", "-f", "-d");
switch(myCleanPolicy) {
case ALL_UNTRACKED:
cmd.addParameter("-x");
break;
case IGNORED_ONLY:
cmd.addParameter("-X");
break;
case NON_IGNORED_ONLY:
break;
}
addExcludes(cmd);
cmd.withMaxOutputSize(8 * 1024 * 1024);
try {
CommandUtil.runCommand(cmd.stdErrExpected(false));
} catch (VcsException e) {
Loggers.VCS.warnAndDebugDetails("Failed to clean files", e);
if (!SystemInfo.isWindows || CommandUtil.isCanceledError(e)) {
throw e;
}
if (CommandUtil.isNoSuchFileOrDirError(e)) {
throw new VcsException("Some files may be locked: " + e.getMessage(), e);
}
final File workingDir = cmd.getWorkingDirectory();
if (workingDir == null) {
throw e;
}
if (CommandUtil.isFileNameTooLongError(e)) {
handleLongFileNames(workingDir, e);
}
}
}
use of jetbrains.buildServer.buildTriggers.vcs.git.command.GitCommandLine in project teamcity-git by JetBrains.
the class DeleteBranchCommandImpl method call.
public void call() throws VcsException {
GitCommandLine cmd = getCmd();
cmd.addParameter("branch");
cmd.addParameter("-D");
cmd.addParameter(myName);
CommandUtil.runCommand(cmd.stdErrExpected(false));
}
Aggregations