if ( workspaceProvided )
{
status = executeUnmapCommand( r, f );
}
ErrorStreamConsumer out = new ErrorStreamConsumer();
ErrorStreamConsumer err = new ErrorStreamConsumer();
if ( workspaceProvided )
{
command = new TfsCommand( "workfold", r, null, getLogger() );
command.addArgument( "-workspace:" + workspace );
command.addArgument( "-map" );
command.addArgument( url );
command.addArgument( f.getBasedir().getAbsolutePath() );
status = command.execute( out, err );
if ( status != 0 || err.hasBeenFed() )
{
return new CheckOutScmResult( command.getCommandString(),
"Error code for TFS checkout (workfold map) command - " + status,
err.getOutput(), false );
}
}
FileListConsumer fileConsumer = new FileListConsumer();
err = new ErrorStreamConsumer();
command = createGetCommand( r, f, v, recursive );
status = command.execute( fileConsumer, err );
if ( status != 0 || err.hasBeenFed() )
{
return new CheckOutScmResult( command.getCommandString(), "Error code for TFS checkout (get) command - "
+ status, err.getOutput(), false );
}
return new CheckOutScmResult( command.getCommandString(), fileConsumer.getFiles() );
}