/** {@inheritDoc} */
protected ExportScmResult executeExportCommand( ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version,
String outputDirectory )
throws ScmException
{
CvsScmProviderRepository repository = (CvsScmProviderRepository) repo;
Commandline cl = CvsCommandUtils.getBaseCommand( "export", repository, fileSet );
if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
{
cl.createArg().setValue( "-r" + version.getName() );
}
else
{
cl.createArg().setValue( "-rHEAD" );
}
if ( StringUtils.isNotEmpty( outputDirectory ) )
{
cl.createArg().setValue( "-d" );
cl.createArg().setValue( outputDirectory );
}
cl.createArg().setValue( repository.getModule() );
if ( getLogger().isInfoEnabled() )
{
getLogger().info( "Executing: " + cl );
getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() );