SynergyUtil.getWorkingProject( getLogger(), repo.getProjectSpec(), repo.getUser(), ccmAddr );
File waPath = SynergyUtil.getWorkArea( getLogger(), projectSpec, ccmAddr );
File sourcePath = new File( waPath, repo.getProjectName() );
if ( projectSpec == null )
{
throw new ScmException( "You should checkout project first" );
}
int taskNum = SynergyUtil.createTask( getLogger(), "Maven SCM Synergy provider: edit command for project "
+ repo.getProjectSpec(), repo.getProjectRelease(), true, ccmAddr );
if ( getLogger().isInfoEnabled() )
{
getLogger().info( "Task " + taskNum + " was created to perform checkout." );
}
for ( File f : fileSet.getFileList() )
{
File dest = f;
File source = new File( sourcePath, SynergyUtil.removePrefix( fileSet.getBasedir(), f ) );
List<File> list = new LinkedList<File>();
list.add( source );
SynergyUtil.checkoutFiles( getLogger(), list, ccmAddr );
if ( !source.equals( dest ) )
{
if ( getLogger().isDebugEnabled() )
{
getLogger().debug( "Copy file [" + source + "] to expected folder [" + dest + "]." );
}
try
{
FileUtils.copyFile( source, dest );
}
catch ( IOException e )
{
throw new ScmException( "Unable to copy file from Work Area", e );
}
}
}
}
finally