use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.
the class TfsStatusCommand method executeStatusCommand.
protected StatusScmResult executeStatusCommand(ScmProviderRepository r, ScmFileSet f) throws ScmException {
TfsScmProviderRepository tfsRepo = (TfsScmProviderRepository) r;
TfsCommand command = createCommand(tfsRepo, f);
ChangedFileConsumer out = new ChangedFileConsumer(getLogger());
ErrorStreamConsumer err = new ErrorStreamConsumer();
int status = command.execute(out, err);
if (status != 0 || err.hasBeenFed()) {
return new StatusScmResult(command.getCommandString(), "Error code for TFS status command - " + status, err.getOutput(), false);
}
Iterator<ScmFile> iter = out.getChangedFiles().iterator();
getLogger().debug("Iterating");
while (iter.hasNext()) {
ScmFile file = (ScmFile) iter.next();
getLogger().debug(file.getPath() + ":" + file.getStatus());
}
return new StatusScmResult(command.getCommandString(), out.getChangedFiles());
}
use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.
the class TfsAddCommandTest method testCommandline.
public void testCommandline() throws Exception {
TfsScmProviderRepository repo = getScmProviderRepository();
Commandline cmd = new TfsAddCommand().createCommand(repo, getScmFileSet()).getCommandline();
String expected = "tf add -login:user,password " + getFileList();
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.
the class TfsChangeLogCommandTest method testCommandline.
public void testCommandline() throws Exception {
TfsScmProviderRepository repo = getScmProviderRepository();
File f = new File("file");
Commandline cmd = new TfsChangeLogCommand().createCommand(repo, getScmFileSet(), f).getCommandline();
String expected = "tf history -login:user,password -format:detailed " + f.getName();
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.
the class TfsCheckOutCommandTest method testCommandline.
public void testCommandline() throws Exception {
TfsScmProviderRepository repo = getScmProviderRepository();
ScmRevision rev = new ScmRevision("revision");
String path = getScmFileSet().getBasedir().getAbsolutePath();
Commandline cmd = new TfsCheckOutCommand().createGetCommand(repo, getScmFileSet(), rev, true).getCommandline();
String expected = "tf get -login:user,password -recursive -force -version:Crevision " + path;
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
use of org.apache.maven.scm.provider.tfs.TfsScmProviderRepository in project maven-scm by apache.
the class TfsCheckInCommandTest method testCommandline.
public void testCommandline() throws Exception {
TfsScmProviderRepository repo = getScmProviderRepository();
Commandline cmd = new TfsCheckInCommand().createCommand(repo, getScmFileSet(), "A comment of many words").getCommandline();
String expected = "tf checkin -login:user,password -noprompt -comment:\"A comment of many words\" " + getFileList();
assertCommandLine(expected, getWorkingDirectory(), cmd);
}
Aggregations