maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r533646 - in /maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs: maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/ maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provid...
Date Mon, 30 Apr 2007 09:27:29 GMT
Author: evenisse
Date: Mon Apr 30 02:27:28 2007
New Revision: 533646

URL: http://svn.apache.org/viewvc?view=rev&rev=533646
Log:
[SCM-304] Fix cvs java implementation for pserver protocol if .cvspass doesn't exist or the
cvsroot doesn't exist in .cvspass

Added:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java
  (with props)
Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsLoginCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsPass.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/CvsJavaScmProvider.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/util/CvsConnection.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsLoginCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsLoginCommand.java?view=diff&rev=533646&r1=533645&r2=533646
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsLoginCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsLoginCommand.java
Mon Apr 30 02:27:28 2007
@@ -50,7 +50,7 @@
         {
             return new LoginScmResult( null, "The cvs login ignored for " + repo.getTransport()
+ ".", "", true );
         }
-        else if ( CvsCommandUtils.isCvsNT() )
+        else if ( isCvsNT() )
         {
             //We don't continue becauseCVSNT doesn't use .cvspass
             return new LoginScmResult( null, "The cvs login ignored for CVSNT.", "", true
);
@@ -71,5 +71,11 @@
         }
 
         return new LoginScmResult( null, "The cvs command succeed.", "", true );
+    }
+
+    public boolean isCvsNT()
+        throws ScmException
+    {
+        return CvsCommandUtils.isCvsNT();
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsPass.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsPass.java?view=diff&rev=533646&r1=533645&r2=533646
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsPass.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/command/login/CvsPass.java
Mon Apr 30 02:27:28 2007
@@ -126,6 +126,10 @@
                     }
                 }
             }
+            else
+            {
+                passFile.getParentFile().mkdirs();
+            }
 
             if ( password == null )
             {
@@ -136,7 +140,7 @@
 
             String pwdfile = buf.toString() + "/1 " + cvsRoot + " A" + mangle( password );
 
-            logger.debug( "Writing -> " + pwdfile );
+            logger.debug( "Writing -> " + pwdfile + " in " + passFile.getAbsolutePath()
);
 
             writer = new PrintWriter( new FileWriter( passFile ) );
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/CvsJavaScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/CvsJavaScmProvider.java?view=diff&rev=533646&r1=533645&r2=533646
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/CvsJavaScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/CvsJavaScmProvider.java
Mon Apr 30 02:27:28 2007
@@ -21,7 +21,6 @@
 
 import org.apache.maven.scm.command.Command;
 import org.apache.maven.scm.provider.cvslib.AbstractCvsScmProvider;
-import org.apache.maven.scm.provider.cvslib.command.login.CvsLoginCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.add.CvsJavaAddCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.changelog.CvsJavaChangeLogCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.checkin.CvsJavaCheckInCommand;
@@ -29,10 +28,11 @@
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.diff.CvsJavaDiffCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.export.CvsJavaExportCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.list.CvsJavaListCommand;
+import org.apache.maven.scm.provider.cvslib.cvsjava.command.login.CvsJavaLoginCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.remove.CvsJavaRemoveCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.status.CvsJavaStatusCommand;
-import org.apache.maven.scm.provider.cvslib.cvsjava.command.tag.CvsJavaTagCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.tag.CvsJavaBranchCommand;
+import org.apache.maven.scm.provider.cvslib.cvsjava.command.tag.CvsJavaTagCommand;
 import org.apache.maven.scm.provider.cvslib.cvsjava.command.update.CvsJavaUpdateCommand;
 
 /**
@@ -85,7 +85,7 @@
 
     protected Command getLoginCommand()
     {
-        return new CvsLoginCommand();
+        return new CvsJavaLoginCommand();
     }
 
     protected Command getRemoveCommand()

Added: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java?view=auto&rev=533646
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java
(added)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java
Mon Apr 30 02:27:28 2007
@@ -0,0 +1,37 @@
+package org.apache.maven.scm.provider.cvslib.cvsjava.command.login;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.provider.cvslib.command.login.CvsLoginCommand;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class CvsJavaLoginCommand
+    extends CvsLoginCommand
+{
+    public boolean isCvsNT()
+        throws ScmException
+    {
+        return false;
+    }
+}

Propchange: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/command/login/CvsJavaLoginCommand.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/util/CvsConnection.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/util/CvsConnection.java?view=diff&rev=533646&r1=533645&r2=533646
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/util/CvsConnection.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvsjava/src/main/java/org/apache/maven/scm/provider/cvslib/cvsjava/util/CvsConnection.java
Mon Apr 30 02:27:28 2007
@@ -276,8 +276,8 @@
      */
     private static String lookupPassword( String cvsRoot, ScmLogger logger )
     {
-        File passFile =
-            new File( System.getProperty( "cvs.passfile", System.getProperty( "user.home"
) + "/.cvspass" ) );
+        File passFile = new File( System.getProperty( "cygwin.user.home", System.getProperty(
"user.home" ) ) + File
+            .separatorChar + ".cvspass" );
 
         BufferedReader reader = null;
         String password = null;



Mime
View raw message