throws ScmException
{
Commandline cl =
createCommandLine( (SvnScmProviderRepository) repo, fileSet.getBasedir(), startVersion, endVersion );
SvnDiffConsumer consumer = new SvnDiffConsumer( getLogger(), fileSet.getBasedir() );
CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
if ( getLogger().isInfoEnabled() )
{
getLogger().info( "Executing: " + SvnCommandLineUtils.cryptPassword( cl ) );
getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() );
}
int exitCode;
try
{
exitCode = SvnCommandLineUtils.execute( cl, consumer, stderr, getLogger() );
}
catch ( CommandLineException ex )
{
throw new ScmException( "Error while executing command.", ex );
}
if ( exitCode != 0 )
{
return new DiffScmResult( cl.toString(), "The svn command failed.", stderr.getOutput(), false );
}
return new DiffScmResult( cl.toString(), consumer.getChangedFiles(), consumer.getDifferences(),
consumer.getPatch() );
}