On Fri, Jun 5, 2009 at 3:14 PM, Brett Porter <br...@apache.org> wrote:
> what issue is this related to? > [CONTINUUM-2077] project scm root of projects are not deleted even when you already delete the projects. Since the call for removeProjectScmRoot() is inside the removeProject, if the project is already deleted, the remaining scm root will not get deleted from the database when you delete the project group. I just added a check to remove remaining scm root of the group just to prevent this from happening. Should I create an issue for this? > > On 05/06/2009, at 5:04 PM, c...@apache.org wrote: > > Author: ctan >> Date: Fri Jun 5 07:04:24 2009 >> New Revision: 781929 >> >> URL: http://svn.apache.org/viewvc?rev=781929&view=rev >> Log: >> remove remaining project scm root when deleting the project group >> >> Modified: >> >> continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java >> >> Modified: >> continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java >> URL: >> http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=781929&r1=781928&r2=781929&view=diff >> >> ============================================================================== >> --- >> continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java >> (original) >> +++ >> continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java >> Fri Jun 5 07:04:24 2009 >> @@ -425,6 +425,14 @@ >> removeProject( projectId ); >> } >> >> + // check if there are any project scm root left >> + List<ProjectScmRoot> scmRoots = >> getProjectScmRootByProjectGroup( projectGroupId ); >> + >> + for ( ProjectScmRoot scmRoot : scmRoots ) >> + { >> + removeProjectScmRoot( scmRoot ); >> + } >> + >> log.info( "Remove project group " + projectGroup.getName() + >> "(" + projectGroup.getId() + ")" ); >> >> Map<String, Object> context = new HashMap<String, Object>(); >> >> >> >