maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r372477 - /maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckOutCommand.java
Date Thu, 26 Jan 2006 08:13:24 GMT
Author: evenisse
Date: Thu Jan 26 00:13:22 2006
New Revision: 372477

URL: http://svn.apache.org/viewcvs?rev=372477&view=rev
Log:
[CONTINUUM-571] Remove checkout directory if already exist before to perform the checkout.
If this directory already exist, it fails with some cvs

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckOutCommand.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckOutCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckOutCommand.java?rev=372477&r1=372476&r2=372477&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckOutCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckOutCommand.java
Thu Jan 26 00:13:22 2006
@@ -23,10 +23,13 @@
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.cvslib.command.CvsCommand;
 import org.apache.maven.scm.provider.cvslib.repository.CvsScmProviderRepository;
+import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
 
+import java.io.IOException;
+
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse </a>
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -39,6 +42,18 @@
     protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repo, ScmFileSet
fileSet, String tag )
         throws ScmException
     {
+        if ( fileSet.getBasedir().exists() )
+        {
+            try
+            {
+                FileUtils.deleteDirectory( fileSet.getBasedir() );
+            }
+            catch ( IOException e )
+            {
+                getLogger().warn( "Can't delete " + fileSet.getBasedir().getAbsolutePath(),
e );
+            }
+        }
+
         CvsScmProviderRepository repository = (CvsScmProviderRepository) repo;
 
         Commandline cl = new Commandline();



Mime
View raw message