You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2007/01/22 00:16:39 UTC

svn commit: r498486 - /maven/sandbox/wagon/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java

Author: jvanzyl
Date: Sun Jan 21 15:16:38 2007
New Revision: 498486

URL: http://svn.apache.org/viewvc?view=rev&rev=498486
Log:
Not sure what the ideal solution is but if you leave the same checkout directory a release will not work because different levels in the repository are checked out in order to add new artifacts and you get errors because the url at that level is not the same. So for each new checkout create a clean directory structure. Ideally for repository deployments we just need to point it at the fixed location of the repository which is the checkout. Only tested this with SVNKit.

Modified:
    maven/sandbox/wagon/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java

Modified: maven/sandbox/wagon/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java
URL: http://svn.apache.org/viewvc/maven/sandbox/wagon/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=diff&rev=498486&r1=498485&r2=498486
==============================================================================
--- maven/sandbox/wagon/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java (original)
+++ maven/sandbox/wagon/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java Sun Jan 21 15:16:38 2007
@@ -54,6 +54,9 @@
  * <p/>
  * TODO it probably creates problems if the same wagon is used in two different SCM protocols, as instance variables can
  * keep incorrect state.
+ * TODO: For doing releases we either have to be able to add files with checking out the repository structure which may not be
+ *       possible, or the checkout directory needs to be a constant. Doing releases won't scale if you have to checkout the
+ *       whole repository structure in order to add 3 files.
  *
  * @author <a href="brett@apache.org">Brett Porter</a>
  * @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
@@ -64,6 +67,9 @@
 public class ScmWagon
     extends AbstractWagon
 {
+    /**
+     * @plexus.requirement
+     */
     private ScmManager scmManager;
 
     private File checkoutDirectory;
@@ -278,6 +284,7 @@
 
             String relPath = checkOut( scmProvider, scmRepository, source.isDirectory() ? targetName : FileUtils
                 .dirname( targetName ) );
+
             File newCheckoutDirectory = new File( checkoutDirectory, relPath );
 
             ScmResult result;
@@ -347,6 +354,8 @@
                              String targetName )
         throws TransferFailedException
     {
+        checkoutDirectory = createCheckoutDirectory();
+
         Stack stack = new Stack();
 
         String target = targetName;