maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r517232 - 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/AbstractCvsScmProvider.java maven-scm-site/src/site/apt/cvs.apt
Date Mon, 12 Mar 2007 14:48:23 GMT
Author: evenisse
Date: Mon Mar 12 07:48:21 2007
New Revision: 517232

URL: http://svn.apache.org/viewvc?view=rev&rev=517232
Log:
[SCM-277] Add support for sspi cvs protocol
Submitted by: Daniel Siegmann

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/AbstractCvsScmProvider.java
    maven/scm/trunk/maven-scm-site/src/site/apt/cvs.apt

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/AbstractCvsScmProvider.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/AbstractCvsScmProvider.java?view=diff&rev=517232&r1=517231&r2=517232
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/AbstractCvsScmProvider.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/AbstractCvsScmProvider.java
Mon Mar 12 07:48:21 2007
@@ -69,6 +69,9 @@
     /** */
     public final static String TRANSPORT_EXT = "ext";
 
+    /** */
+    public final static String TRANSPORT_SSPI = "sspi";
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -227,7 +230,7 @@
             cvsroot = tokens[1];
         }
         else if ( transport.equalsIgnoreCase( TRANSPORT_PSERVER ) || transport.equalsIgnoreCase(
TRANSPORT_LSERVER ) ||
-            transport.equalsIgnoreCase( TRANSPORT_EXT ) )
+            transport.equalsIgnoreCase( TRANSPORT_EXT ) || transport.equalsIgnoreCase( TRANSPORT_SSPI
) )
         {
             if ( tokens.length != 4 && transport.equalsIgnoreCase( TRANSPORT_EXT
) )
             {
@@ -247,6 +250,12 @@
 
                 return result;
             }
+            else if ( tokens.length != 4 && transport.equalsIgnoreCase( TRANSPORT_SSPI
) )
+            {
+                result.messages.add( "The connection string contains an incorrect number
of tokens (should be four)." );
+
+                return result;
+            }
 
             if ( transport.equalsIgnoreCase( TRANSPORT_LSERVER ) )
             {
@@ -409,6 +418,33 @@
 
             cvsroot += path;
         }
+        else if ( transport.equalsIgnoreCase( TRANSPORT_SSPI ) )
+        {
+            //sspi:[username@]host:path:module
+            String userhost = tokens[1];
+
+            int index = userhost.indexOf( "@" );
+
+            if ( index == -1 )
+            {
+                user = "";
+
+                host = userhost;
+            }
+            else
+            {
+                user = userhost.substring( 0, index );
+
+                host = userhost.substring( index + 1 );
+            }
+
+            path = tokens[2];
+
+            module = tokens[3];
+
+            // cvsroot format is :sspi:host:path
+            cvsroot = ":" + transport + ":" + host + ":" + path;
+        }
         else
         {
             if ( !transport.equalsIgnoreCase( TRANSPORT_LOCAL ) )
@@ -597,7 +633,7 @@
     }
 
     /**
-     * @see org.apache.maven.scm.provider.AbstractScmProvider#list(org.apache.maven.scm.repository.ScmRepository,
org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.CommandParameters)
+     * @see org.apache.maven.scm.provider.AbstractScmProvider#list(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.CommandParameters)
      */
     protected ListScmResult list( ScmRepository repository, ScmFileSet fileSet, CommandParameters
parameters )
         throws ScmException

Modified: maven/scm/trunk/maven-scm-site/src/site/apt/cvs.apt
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-site/src/site/apt/cvs.apt?view=diff&rev=517232&r1=517231&r2=517232
==============================================================================
--- maven/scm/trunk/maven-scm-site/src/site/apt/cvs.apt (original)
+++ maven/scm/trunk/maven-scm-site/src/site/apt/cvs.apt Mon Mar 12 07:48:21 2007
@@ -45,6 +45,7 @@
 scm:cvs<delimiter>lserver<delimiter>[username@]servername[<delimiter>port]<delimiter>path_to_repository<delimiter>module_name
 scm:cvs<delimiter>pserver<delimiter>[username[<delimiter>password]@]servername[<delimiter>port]<delimiter>path_to_repository<delimiter>module_name
 scm:cvs<delimiter>ext<delimiter>[username@]servername<delimiter>path_to_repository<delimiter>module_name
+scm:cvs<delimiter>sspi<delimiter>[username@]host<delimiter>path<delimiter>module
 -------
 
 * Examples



Mime
View raw message