maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r892495 - /maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java
Date Sat, 19 Dec 2009 18:43:04 GMT
Author: olamy
Date: Sat Dec 19 18:43:04 2009
New Revision: 892495

URL: http://svn.apache.org/viewvc?rev=892495&view=rev
Log:
[SCM-515] branch command must support remote branching (svnexe)
add mojo parameter

Modified:
    maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java?rev=892495&r1=892494&r2=892495&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java
Sat Dec 19 18:43:04 2009
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.scm.ScmBranchParameters;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.command.branch.BranchScmResult;
 import org.apache.maven.scm.provider.ScmProvider;
@@ -52,6 +53,16 @@
      * @parameter expression="${message}"
      */
     private String message;
+    
+    /**
+     * currently only implemented with svn scm. Enable a workaround to prevent issue 
+     * due to svn client > 1.5.0 (http://jira.codehaus.org/browse/SCM-406)
+     *      
+     * 
+     * @parameter expression="${remoteTagging}" default-value="true"
+     * @since 1.3
+     */    
+    private boolean remoteBranching;     
 
     /** {@inheritDoc} */
     public void execute()
@@ -67,7 +78,10 @@
             String finalBranch = provider.sanitizeTagName( branch );
             getLog().info( "Final Branch Name: '" + finalBranch + "'" );
 
-            BranchScmResult result = provider.branch( repository, getFileSet(), finalBranch,
message );
+            ScmBranchParameters scmBranchParameters = new ScmBranchParameters( message );
+            scmBranchParameters.setRemoteBranching( remoteBranching );
+            
+            BranchScmResult result = provider.branch( repository, getFileSet(), finalBranch,
scmBranchParameters );
 
             checkResult( result );
         }



Mime
View raw message