You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/09/09 20:22:00 UTC

[jira] [Commented] (SCM-859) Subversion commands don't work if path or URL contains '@'

    [ https://issues.apache.org/jira/browse/SCM-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608560#comment-16608560 ] 

ASF GitHub Bot commented on SCM-859:
------------------------------------

asfgit closed pull request #58: [SCM-859] SVN-Update-doesnt-work
URL: https://github.com/apache/maven-scm/pull/58
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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/update/SvnUpdateCommand.java b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommand.java
index 5edcbbc8d..e79abc76f 100644
--- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommand.java
+++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommand.java
@@ -136,7 +136,7 @@ public static Commandline createCommandLine( SvnScmProviderRepository repository
                 cl.createArg().setValue( version.getName() );
             }
 
-            cl.createArg().setValue( workingDir );
+            cl.createArg().setValue( workingDir + "@" );
         }
         else
         {
diff --git a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommandTest.java b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommandTest.java
index 90a71d4f7..70c951144 100644
--- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommandTest.java
+++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/test/java/org/apache/maven/scm/provider/svn/svnexe/command/update/SvnUpdateCommandTest.java
@@ -43,49 +43,49 @@ public void testCommandLineWithEmptyTag()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmTag( "" ),
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithEmptyBranch()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmBranch( "" ),
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithEmptyVersion()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmRevision( "" ),
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithWhitespaceTag()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmTag( "  " ),
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithWhitespaceBranch()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmBranch( "  " ),
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithWhitespaceRevision()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", new ScmRevision( "  " ),
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithoutTag()
         throws Exception
     {
         testCommandLine( "scm:svn:http://foo.com/svn/trunk", null,
-                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() );
+                         "svn --non-interactive update " + getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineTag()
@@ -93,7 +93,7 @@ public void testCommandLineTag()
     {
         testCommandLine( "scm:svn:http://anonymous@foo.com/svn/trunk", new ScmRevision( "10" ),
                          "svn --username anonymous --no-auth-cache --non-interactive update -r 10 " +
-                             getUpdateTestFile().getAbsolutePath() );
+                             getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithUsernameAndTag()
@@ -101,7 +101,7 @@ public void testCommandLineWithUsernameAndTag()
     {
         testCommandLine( "scm:svn:http://anonymous@foo.com/svn/trunk", new ScmRevision( "10" ),
                          "svn --username anonymous --no-auth-cache --non-interactive update -r 10 " +
-                             getUpdateTestFile().getAbsolutePath() );
+                             getUpdateTestFile().getAbsolutePath() + "@" );
     }
 
     public void testCommandLineWithCygwinProperty()
@@ -114,7 +114,7 @@ public void testCommandLineWithCygwinProperty()
             {
                 assertTrue( SvnUtil.getSettings().isUseCygwinPath() );
                 testCommandLine( "scm:svn:http://foo.com/svn/trunk", null,
-                                 "svn --non-interactive update /mnt/c/my_working_directory",
+                                 "svn --non-interactive update /mnt/c/my_working_directory@",
                                  new File( "c:\\my_working_directory" ) );
             }
             finally


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Subversion commands don't work if path or URL contains '@'
> ----------------------------------------------------------
>
>                 Key: SCM-859
>                 URL: https://issues.apache.org/jira/browse/SCM-859
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.9.5
>            Reporter: Thomas Kunkel
>            Assignee: Michael Osipov
>            Priority: Minor
>             Fix For: 1.11.1
>
>
> scm:update with the svn provider doesn't work when the working directory contains an "@"
> Following the error message when the folder itself has an "@" sign
> {code:java}
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building svntest 0.0.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-scm-plugin:1.9.5:update (default-cli) @ svntest ---
> [INFO] Executing: cmd.exe /X /C "svn --non-interactive update C:\SVNTest\failingTest@"
> [INFO] Working directory: C:\SVNTest\failingTest@
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: E155007: None of the targets are working copies
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.357 s
> [INFO] Finished at: 2018-02-07T12:35:08+01:00
> [INFO] Final Memory: 11M/155M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.9.5:update (default-cli) on project svntest: Command failed.The svn command failed. -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException{code}
> Following the error when the "@" sign is in an parent folder name
> {code:java}
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building svntest 0.0.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-scm-plugin:1.9.5:update (default-cli) @ svntest ---
> [INFO] Executing: cmd.exe /X /C "svn --non-interactive update C:\SVNTest\failingTest@\Subfolderfail"
> [INFO] Working directory: C:\SVNTest\failingTest@\Subfolderfail
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: E200009: 'C:********@\Subfolderfail': a peg revision is not allowed here
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.248 s
> [INFO] Finished at: 2018-02-07T12:35:33+01:00
> [INFO] Final Memory: 11M/155M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.9.5:update (default-cli) on project svntest: Command failed.The svn command failed. -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException{code}
> This error can be fixed by appending an additional "@" after the path in the command.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)