Search in sources :

Example 11 with FileListConsumer

use of org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer 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

FileListConsumer (org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer)11 ErrorStreamConsumer (org.apache.maven.scm.provider.tfs.command.consumer.ErrorStreamConsumer)7 ScmException (org.apache.maven.scm.ScmException)1 ScmFile (org.apache.maven.scm.ScmFile)1 AddScmResult (org.apache.maven.scm.command.add.AddScmResult)1 CheckInScmResult (org.apache.maven.scm.command.checkin.CheckInScmResult)1 CheckOutScmResult (org.apache.maven.scm.command.checkout.CheckOutScmResult)1 EditScmResult (org.apache.maven.scm.command.edit.EditScmResult)1 ListScmResult (org.apache.maven.scm.command.list.ListScmResult)1 UnEditScmResult (org.apache.maven.scm.command.unedit.UnEditScmResult)1 UpdateScmResult (org.apache.maven.scm.command.update.UpdateScmResult)1 TfsScmProviderRepository (org.apache.maven.scm.provider.tfs.TfsScmProviderRepository)1 ServerFileListConsumer (org.apache.maven.scm.provider.tfs.command.consumer.ServerFileListConsumer)1 CommandLineException (org.codehaus.plexus.util.cli.CommandLineException)1 StringStreamConsumer (org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer)1