Search in sources :

Example 1 with ServerFileListConsumer

use of org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer in project maven-scm by apache.

the class TfsListCommandTest method setUp.

protected void setUp() throws Exception {
    super.setUp();
    consumer = new ServerFileListConsumer();
}
Also used : ServerFileListConsumer(org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer)

Example 2 with ServerFileListConsumer

use of org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer in project maven-scm by apache.

the class TfsListCommand method executeListCommand.

protected ListScmResult executeListCommand(ScmProviderRepository r, ScmFileSet f, boolean recursive, ScmVersion v) throws ScmException {
    FileListConsumer out = new ServerFileListConsumer();
    ErrorStreamConsumer err = new ErrorStreamConsumer();
    TfsCommand command = createCommand(r, f, recursive);
    int status = command.execute(out, err);
    if (status != 0 || err.hasBeenFed()) {
        return new ListScmResult(command.getCommandString(), "Error code for TFS list command - " + status, err.getOutput(), false);
    }
    return new ListScmResult(command.getCommandString(), out.getFiles());
}
Also used : ServerFileListConsumer(org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer) ServerFileListConsumer(org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer) FileListConsumer(org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer) ListScmResult(org.apache.maven.scm.command.list.ListScmResult) ErrorStreamConsumer(org.apache.maven.scm.provider.tfs.command.consumer.ErrorStreamConsumer)

Aggregations

ServerFileListConsumer (org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer)2 ListScmResult (org.apache.maven.scm.command.list.ListScmResult)1 ErrorStreamConsumer (org.apache.maven.scm.provider.tfs.command.consumer.ErrorStreamConsumer)1 FileListConsumer (org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer)1