You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2018/05/10 23:43:17 UTC

[maven-scm] branch SCM-887 updated (e9532d4 -> 3f8e1ca)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch SCM-887
in repository https://gitbox.apache.org/repos/asf/maven-scm.git.


 discard e9532d4  Lets see
     new 69869d1  SubversionTests
     new 3f8e1ca  AccuRev

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e9532d4)
            \
             N -- N -- N   refs/heads/SCM-887 (3f8e1ca)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../provider/accurev/cli/AccuRevCommandLineTest.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
michaelo@apache.org.

[maven-scm] 02/02: AccuRev

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch SCM-887
in repository https://gitbox.apache.org/repos/asf/maven-scm.git

commit 3f8e1cadafabeebcfed50185fcb64f014dd344a7
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri May 11 01:38:27 2018 +0200

    AccuRev
---
 .../provider/accurev/cli/AccuRevCommandLineTest.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java
index f36c862..57e9423 100644
--- a/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java
+++ b/maven-scm-providers/maven-scm-provider-accurev/src/test/java/org/apache/maven/scm/provider/accurev/cli/AccuRevCommandLineTest.java
@@ -239,7 +239,7 @@ public class AccuRevCommandLineTest
         accuRevCL.popExternal( testfile, "stream", "12", Collections.singleton( projectDir ) );
 
         Commandline lastCL = accuRevCL.getCommandline();
-        assertThat( lastCL.getExecutable(), is( "accurev.exe" ) );
+        assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
         assertThat( lastCL.getArguments(), is( new String[] { "pop", "-H", "aHost:5051", "-v", "stream", "-L",
             testfile.getAbsolutePath(), "-t", "12", "-R", projectDir.getPath() } ) );
 
@@ -256,11 +256,11 @@ public class AccuRevCommandLineTest
         accuRevCL.popExternal( testfile, "stream", "now", Collections.singleton( projectDir ) );
 
         Commandline lastCL = accuRevCL.getCommandline();
-        assertThat( lastCL.getExecutable(), is( "accurev.exe" ) );
+        assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
         assertThat( lastCL.getArguments(), is( new String[] { "pop", "-H", "aHost:5051", "-v", "stream", "-L",
             testfile.getAbsolutePath(),  "-R", projectDir.getPath() } ) );
     }
-    
+
     @Test
     public void testPopExternalWithTransactionNull()
         throws Exception
@@ -272,11 +272,11 @@ public class AccuRevCommandLineTest
         accuRevCL.popExternal( testfile, "stream", null, Collections.singleton( projectDir ) );
 
         Commandline lastCL = accuRevCL.getCommandline();
-        assertThat( lastCL.getExecutable(), is( "accurev.exe" ) );
+        assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
         assertThat( lastCL.getArguments(), is( new String[] { "pop", "-H", "aHost:5051", "-v", "stream", "-L",
             testfile.getAbsolutePath(), "-R", projectDir.getPath() } ) );
     }
-    
+
     @Test
     public void testPopWorkSpace()
         throws Exception
@@ -289,7 +289,7 @@ public class AccuRevCommandLineTest
         accuRevCL.pop( new File( "/home/workspace" ), Collections.singleton( testFile ) );
 
         Commandline lastCL = accuRevCL.getCommandline();
-        assertThat( lastCL.getExecutable(), is( "accurev.exe" ) );
+        assertThat( lastCL.getLiteralExecutable(), is( "accurev.exe" ) );
         // take care of symlink
         if (lastCL.getWorkingDirectory().getCanonicalFile().equals( lastCL.getWorkingDirectory().getAbsoluteFile() ))
         {
@@ -297,7 +297,7 @@ public class AccuRevCommandLineTest
         } else {
             assertThat( lastCL.getWorkingDirectory(), is( new File( "/home/workspace" ).getAbsoluteFile() ));// .getCanonicalFile() ) );
         }
-        
+
         assertThat( lastCL.getArguments(), is( new String[] { "pop", "-R", testFile.getPath() } ) );
 
     }
@@ -313,7 +313,7 @@ public class AccuRevCommandLineTest
         accuRevCL.mkws( "myStream", "myWorkSpaceName", workspaceFile );
 
         Commandline lastCL = accuRevCL.getCommandline();
-        assertThat( lastCL.getExecutable(), is( "accurev2.exe" ) );
+        assertThat( lastCL.getLiteralExecutable(), is( "accurev2.exe" ) );
         assertThat( lastCL.getWorkingDirectory(), is( workspaceFile.getCanonicalFile() ) );
         assertThat( lastCL.getArguments(), is( new String[] { "mkws", "-b", "myStream", "-w", "myWorkSpaceName", "-l",
             workspaceFile.getAbsolutePath() } ) );
@@ -400,7 +400,7 @@ public class AccuRevCommandLineTest
         List<String> shellCmds = cl.getShell().getShellCommandLine( cl.getArguments() );
         accuRevCL.reset();
         assertThat( cl.getShell().getShellCommandLine( cl.getArguments() ), is( shellCmds ) );
-        assertThat( commandline.getShell().getExecutable(), is( "accurev" ) );
+        assertThat( commandline.getLiteralExecutable(), is( "accurev" ) );
     }
 
     @Test

-- 
To stop receiving notification emails like this one, please contact
michaelo@apache.org.

[maven-scm] 01/02: SubversionTests

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch SCM-887
in repository https://gitbox.apache.org/repos/asf/maven-scm.git

commit 69869d16e212975699b79ee0ca6a80e2ffa143ae
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri May 11 01:34:58 2018 +0200

    SubversionTests
---
 .../svn/svnexe/command/SvnCommandLineUtils.java    | 47 ++++++++++++++--------
 1 file changed, 30 insertions(+), 17 deletions(-)

diff --git a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java
index a4c9c4a..d7fb959 100644
--- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java
+++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/SvnCommandLineUtils.java
@@ -222,30 +222,42 @@ public final class SvnCommandLineUtils
     {
         String clString = cl.toString();
 
-        final String passwordArg = "--password ";
+        final String passwordOpt = "--password";
         String quoteChar;
         String escapedQuoteChar;
         String cryptedPassword;
 
-        int pos = clString.indexOf( passwordArg );
+        int pos = clString.indexOf( passwordOpt );
 
         if ( pos > 0 )
         {
-            String beforePassword = clString.substring( 0, pos + passwordArg.length() );
-            String afterPassword = clString.substring( pos + passwordArg.length() );
-
-            if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
-            {
-                 quoteChar = "\"";
-                 escapedQuoteChar = "\"\"";
-                 cryptedPassword = "*****";
-            }
-            else
-            {
-                quoteChar = "'";
-                escapedQuoteChar = "'\\''";
-                cryptedPassword = "'*****'";
-            }
+           if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
+           {
+                quoteChar = "\"";
+                escapedQuoteChar = "\"\"";
+                cryptedPassword = "*****";
+           }
+           else
+           {
+               quoteChar = "'";
+               escapedQuoteChar = "'\"'\"'";
+               cryptedPassword = "'*****'";
+           }
+
+           // Move pointer after password option
+           pos += passwordOpt.length();
+
+           // Skip quote after password option
+           if ( clString.substring( pos,  pos + 1 ).equals( quoteChar ) )
+           {
+               pos++;
+           }
+
+           // Skip space after password option
+           pos++;
+
+            String beforePassword = clString.substring( 0, pos );
+            String afterPassword = clString.substring( pos );
 
             if ( afterPassword.startsWith( quoteChar ) )
             {
@@ -259,6 +271,7 @@ public final class SvnCommandLineUtils
             }
             else
             {
+                // We assume that the password arg ist not the last one on the arg list
                 afterPassword = afterPassword.substring( afterPassword.indexOf( ' ' ) );
             }
 

-- 
To stop receiving notification emails like this one, please contact
michaelo@apache.org.