catch ( NoSuchScmProviderException e )
{
throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
}
UpdateScmResult result;
try
{
result = provider.update( repository, new ScmFileSet( new File( releaseDescriptor.getWorkingDirectory() ) ),
(ScmVersion) null );
}
catch ( ScmException e )
{
throw new ReleaseExecutionException( "An error occurred while updating your local copy: " + e.getMessage(),
e );
}
if ( !result.isSuccess() )
{
throw new ReleaseScmCommandException( "Unable to update current working copy", result );
}
copyUpdated = ( result.getUpdatedFiles().size() > 0 );
relResult.setResultCode( ReleaseResult.SUCCESS );
return relResult;
}