maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r690044 - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/ maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/
Date Thu, 28 Aug 2008 23:27:22 GMT
Author: vsiveton
Date: Thu Aug 28 16:27:22 2008
New Revision: 690044

URL: http://svn.apache.org/viewvc?rev=690044&view=rev
Log:
SCM-383: SVN Tag does not use includes/excludes parameters

o fixed 

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
    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-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java?rev=690044&r1=690043&r2=690044&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java Thu Aug
28 16:27:22 2008
@@ -19,7 +19,9 @@
  * under the License.
  */
 
+import org.codehaus.plexus.util.DirectoryScanner;
 import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -36,10 +38,15 @@
  */
 public class ScmFileSet
 {
-    private static final String DEFAULT_EXCLUDES = "**/CVS/**,**/.svn/**";
+    /** @see DirectoryScanner#DEFAULTEXCLUDES */
+    private static final String DEFAULT_EXCLUDES = StringUtils.join( DirectoryScanner.DEFAULTEXCLUDES,
"," );
 
     private File basedir;
 
+    private String includes;
+
+    private String excludes;
+
     /**
      * List of File objects, all relative to the basedir.
      */
@@ -91,6 +98,8 @@
         }
 
         this.files = FileUtils.getFiles( basedir, includes, excludes, false );
+        this.includes = includes;
+        this.excludes = excludes;
     }
 
     /**
@@ -172,6 +181,24 @@
         return this.files;
     }
 
+
+    /**
+     * @return the includes files as a comma separated string
+     */
+    public String getIncludes()
+    {
+        return this.includes;
+    }
+
+
+    /**
+     * @return the excludes files as a comma separated string
+     */
+    public String getExcludes()
+    {
+        return this.excludes;
+    }
+
     /** {@inheritDoc} */
     public String toString()
     {

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=690044&r1=690043&r2=690044&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
Thu Aug 28 16:27:22 2008
@@ -126,7 +126,21 @@
 
         try
         {
-            files = FileUtils.getFiles( fileSet.getBasedir(), "**", "**/.svn/**", false );
+            if ( StringUtils.isNotEmpty( fileSet.getExcludes() ) )
+            {
+                files =
+                    FileUtils.getFiles( fileSet.getBasedir(),
+                                        ( StringUtils.isEmpty( fileSet.getIncludes() ) ?
"**"
+                                                        : fileSet.getIncludes() ), fileSet.getExcludes()
+                                            + ",**/.svn/**", false );
+            }
+            else
+            {
+                files =
+                    FileUtils.getFiles( fileSet.getBasedir(),
+                                        ( StringUtils.isEmpty( fileSet.getIncludes() ) ?
"**"
+                                                        : fileSet.getIncludes() ), "**/.svn/**",
false );
+            }
         }
         catch ( IOException e )
         {



Mime
View raw message