catch ( NoSuchScmProviderException e )
{
throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
}
StatusScmResult result;
try
{
result =
provider.status( repository, new ScmFileSet( new File( releaseDescriptor.getWorkingDirectory() ) ) );
}
catch ( ScmException e )
{
throw new ReleaseExecutionException( "An error occurred during the status check process: " + e.getMessage(),
e );
}
if ( !result.isSuccess() )
{
throw new ReleaseScmCommandException( "Unable to check for local modifications", result );
}
List<ScmFile> changedFiles = result.getChangedFiles();
// TODO: would be nice for SCM status command to do this for me.
for ( Iterator<ScmFile> i = changedFiles.iterator(); i.hasNext(); )
{
ScmFile f = i.next();