maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r687028 - in /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src: main/java/org/apache/maven/scm/provider/svn/ test/java/org/apache/maven/scm/provider/svn/
Date Tue, 19 Aug 2008 12:02:06 GMT
Author: vsiveton
Date: Tue Aug 19 05:02:05 2008
New Revision: 687028

URL: http://svn.apache.org/viewvc?rev=687028&view=rev
Log:
SCM-379: SCM URL with query transformed incorrectly on release:prepare

o fixed queryString 
o added test case

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtils.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/test/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtilsTest.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtils.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtils.java?rev=687028&r1=687027&r2=687028&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtils.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/main/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtils.java
Tue Aug 19 05:02:05 2008
@@ -210,6 +210,8 @@
         if ( repositoryUrl.indexOf( "?" ) >= 0 )
         {
             queryString = repositoryUrl.substring( repositoryUrl.indexOf( "?" ) );
+            // if repositoryUrl contains a query string, remove it from repositoryUrlRoot;
will be re-appended later
+            projectRoot = StringUtils.replace( projectRoot, queryString, "" );
         }
 
         if ( branchTagName.indexOf( "://" ) >= 0 )

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/test/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/test/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtilsTest.java?rev=687028&r1=687027&r2=687028&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/test/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtilsTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svn-commons/src/test/java/org/apache/maven/scm/provider/svn/SvnTagBranchUtilsTest.java
Tue Aug 19 05:02:05 2008
@@ -282,6 +282,22 @@
 
     }
 
+    /**
+     * Test SCM-379
+     *
+     * @throws Exception if any
+     */
+    public void testResolveUrlWithQuery()
+        throws Exception
+    {
+        String url = "https://myserver/plugins/scmsvn/viewcvs.php/pom/trunk?root=myproj";
+
+        SvnScmProviderRepository repo = new SvnScmProviderRepository( url );
+
+        assertEquals( "https://myserver/plugins/scmsvn/viewcvs.php/pom/trunk/tags/mytag-1?root=myproj",
+                      SvnTagBranchUtils.resolveTagUrl( repo, new ScmTag( "mytag-1" ) ) );
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------



Mime
View raw message