throws ContinuumException
{
try
{
removeProjectScmRoot( oldScmRoot );
ProjectScmRoot scmRoot =
projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( project.getProjectGroup().getId(),
project.getScmUrl() );
if ( scmRoot == null )
{
ProjectScmRoot newScmRoot = new ProjectScmRoot();
if ( project.getScmUrl().equals( oldScmRoot.getScmRootAddress() ) )
{
BeanUtils.copyProperties( oldScmRoot, newScmRoot, new String[]{"id", "projectGroup"} );
}
else
{
newScmRoot.setScmRootAddress( project.getScmUrl() );
}
newScmRoot.setProjectGroup( project.getProjectGroup() );
projectScmRootDao.addProjectScmRoot( newScmRoot );
}
}
catch ( ContinuumStoreException ex )
{