maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Lundberg <dennis.lundb...@mdh.se>
Subject Re: svn commit: r370646 - in /maven/maven-1/plugins/trunk/changelog: src/main/org/apache/maven/changelog/ChangeLog.java xdocs/changes.xml
Date Thu, 19 Jan 2006 23:15:51 GMT
This change does not work if the scm url is using "|" as separator 
instead of ":". See more below...

ltheussl@apache.org wrote:
> Author: ltheussl
> Date: Thu Jan 19 13:47:50 2006
> New Revision: 370646
> 
> URL: http://svn.apache.org/viewcvs?rev=370646&view=rev
> Log:
> PR: MPCHANGELOG-72
> Submitted by: Pascal Larin
> Auto select factory from connection doesn't work if
> provider name length different from 3.
> 
> Modified:
>     maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
>     maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml
> 
> Modified: maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
> URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java?rev=370646&r1=370645&r2=370646&view=diff
> ==============================================================================
> --- maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
(original)
> +++ maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
Thu Jan 19 13:47:50 2006
> @@ -503,15 +503,22 @@
>      {
>          if ( clFactoryClass == null )
>          {
> -            if ( ( connection == null ) || ( connection.length() < 7 )
> +            //Connection Format: scm:<provider>[:<provider specific connection
string>]
> +            if ( ( connection == null ) || ( connection.length() < 5 )

This line might cause problems in the future. Upcoming versions of 
maven-scm will allow a scm url to start with "scm|" as well as "scm:".

>                  || !connection.startsWith( "scm:" ) )
>              {
>                  LOG.warn( "Connection does not appear valid" );
>              }
>              else
>              {
> -                clFactoryClass =
> -                    (String) FACTORIES.get( connection.substring( 4, 7 ) );

The line below will return -1 if is no ":" after position 3.

> +                int iProviderEnd = connection.indexOf( ":", 4 );
> +                if ( iProviderEnd == -1 )
> +                {
> +                    // Connection = scm:<provider>

If that is the case, then this line will be executed...

> +                    iProviderEnd = connection.length();
> +                }
> +

... and this line will fail, because it returns everything after "scm:".

> +                clFactoryClass = (String) FACTORIES.get( connection.substring( 4, iProviderEnd
) );
>              }
>  
>              if ( clFactoryClass == null )
> 
> Modified: maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml
> URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml?rev=370646&r1=370645&r2=370646&view=diff
> ==============================================================================
> --- maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml (original)
> +++ maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml Thu Jan 19 13:47:50 2006
> @@ -25,6 +25,7 @@
>    </properties>
>    <body>
>      <release version="1.9-SNAPSHOT" date="in SVN">
> +      <action dev="ltheussl" type="fix" issue="MPCHANGELOG-72" due-to="Pascal Larin">Auto
select factory from connection doesn't work if provider name length different from 3.</action>
>        <action dev="ltheussl" type="add" issue="MPCHANGELOG-80" due-to="Christoph
Jerolimov">Add MKS SI support.</action>
>        <action dev="ltheussl" type="fix" issue="MPCHANGELOG-69">Changelog returns
0 entries on Windows with CVS (not CVSNT). New property <code>maven.changelog.quoteDate</code>.</action>
>        <action dev="ltheussl" type="fix" issue="MPCHANGELOG-74">Changelog plugin
creates wrong links for Subversion repositories. New property <code>maven.changelog.svn.baseurl</code>.</action>
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message