use of org.apache.maven.scm.provider.tfs.command.consumer.ChangedFileConsumer in project maven-scm by apache.
the class TfsStatusCommandTest method setUp.
protected void setUp() throws Exception {
super.setUp();
consumer = new ChangedFileConsumer(new DefaultLog());
defaultLocale = Locale.getDefault();
}
use of org.apache.maven.scm.provider.tfs.command.consumer.ChangedFileConsumer 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());
}
Aggregations