continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r219455 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
Date Mon, 18 Jul 2005 04:35:37 GMT
Author: evenisse
Date: Sun Jul 17 21:34:50 2005
New Revision: 219455

URL: http://svn.apache.org/viewcvs?rev=219455&view=rev
Log:
Clean working directory before checkout a project.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java?rev=219455&r1=219454&r2=219455&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
Sun Jul 17 21:34:50 2005
@@ -17,6 +17,7 @@
  */
 
 import java.io.File;
+import java.io.IOException;
 import java.util.Iterator;
 
 import org.apache.maven.continuum.project.ContinuumProject;
@@ -28,6 +29,7 @@
 import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.scm.ScmManager;
+import org.codehaus.plexus.util.FileUtils;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -64,6 +66,17 @@
                     if ( !workingDirectory.mkdirs() )
                     {
                         throw new ContinuumScmException( "Could not make directory: " + workingDirectory.getAbsolutePath()
);
+                    }
+                }
+                else
+                {
+                    try
+                    {
+                        FileUtils.cleanDirectory( workingDirectory );
+                    }
+                    catch ( IOException e )
+                    {
+                        throw new ContinuumScmException( "Could not clean directory : " +
workingDirectory.getAbsolutePath(), e );
                     }
                 }
 



Mime
View raw message