maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r754839 - /maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java
Date Mon, 16 Mar 2009 08:23:43 GMT
Author: olamy
Date: Mon Mar 16 08:23:42 2009
New Revision: 754839

URL: http://svn.apache.org/viewvc?rev=754839&view=rev
Log:
[SCM-262] using the local revision for remote tagging is buggy


Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java?rev=754839&r1=754838&r2=754839&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java
Mon Mar 16 08:23:42 2009
@@ -111,15 +111,7 @@
             return new TagScmResult( null, "Error while making a temporary file for the commit
message: "
                 + ex.getMessage(), null, false );
         }
-        
-        // do we need a svn rev ? yes if remote tagging and scmTag.parameters.scmRevision
== null
-        if (scmTagParameters.isRemoteTagging() && scmTagParameters.getScmRevision()
== null)
-        {
-            String currentSvnRev = getCurrentSvnRev( fileSet );
-            getLogger().info( "tag with the current svn rev " + currentSvnRev );
-            scmTagParameters.setScmRevision( currentSvnRev );
-        }
-        
+       
         Commandline cl = createCommandLine( repository, fileSet.getBasedir(), tag, messageFile,
scmTagParameters );
         
         CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();
@@ -246,7 +238,9 @@
             cl.createArg().setValue( "--revision" );
             
             cl.createArg().setValue( scmTagParameters.getScmRevision() );
+            
         }
+        
 
         if ( scmTagParameters != null && scmTagParameters.isRemoteTagging() )
         {
@@ -263,20 +257,4 @@
 
         return cl;
     }    
-    
-    private String getCurrentSvnRev( ScmFileSet fileSet )
-        throws ScmException
-    {
-        // Determine the revision of the working directory.
-        SvnInfoCommand infoCmd = new SvnInfoCommand();
-        infoCmd.setLogger( getLogger() );
-        ScmFileSet infoFileSet = new ScmFileSet( fileSet.getBasedir(), fileSet.getBasedir()
);
-        SvnInfoScmResult ret = infoCmd.executeInfoCommand( null, infoFileSet, null, false,
null );
-        if ( ret.isSuccess() )
-        {
-            SvnInfoItem item = (SvnInfoItem) ret.getInfoItems().iterator().next();
-            return item.getRevision();
-        }
-        return null;
-    }
 }



Mime
View raw message