try
{
ScmRepository repository = getScmRepository();
if (repository.getProviderRepository() instanceof SvnScmProviderRepository) {
SvnInfoScmResult scmResult = info( repository, new ScmFileSet( scmDirectory ) );
if ( ! scmResult.isSuccess() )
{
getLog().debug( "Cannot get the branch information from the scm repository : " +
scmResult.getCommandOutput() );
return DEFAULT_BRANCH_NAME;
}
SvnInfoItem info = (SvnInfoItem) scmResult.getInfoItems().get( 0 );
scmUrl = info.getURL();
} else if (repository.getProviderRepository() instanceof GitScmProviderRepository) {
GitBranchParseCommand command = new GitBranchParseCommand();
command.setLogger(getLogger());