throws ScmException, AccuRevException
{
// Do we have a supplied branch. If not we default to the URL stream.
ScmBranch branch = (ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null );
AccuRevVersion branchVersion = repository.getAccuRevVersion( branch );
String stream = branchVersion.getBasisStream();
String fromSpec = branchVersion.getTimeSpec();
String toSpec = "highest";
// Versions
ScmVersion startVersion = parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null );
ScmVersion endVersion = parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null );
if ( startVersion != null && StringUtils.isNotEmpty( startVersion.getName() ) )
{
AccuRevVersion fromVersion = repository.getAccuRevVersion( startVersion );
// if no end version supplied then use same basis as startVersion
AccuRevVersion toVersion =
endVersion == null ? new AccuRevVersion( fromVersion.getBasisStream(), "now" )
: repository.getAccuRevVersion( endVersion );
if ( !StringUtils.equals( fromVersion.getBasisStream(), toVersion.getBasisStream() ) )
{
throw new AccuRevException( "Not able to provide change log between different streams " + fromVersion
+ "," + toVersion );
}
stream = fromVersion.getBasisStream();
fromSpec = fromVersion.getTimeSpec();
toSpec = toVersion.getTimeSpec();
}
Date startDate = parameters.getDate( CommandParameter.START_DATE, null );
Date endDate = parameters.getDate( CommandParameter.END_DATE, null );