ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r982469 - in /ant/core/trunk: WHATSNEW docs/manual/dirtasks.html src/main/org/apache/tools/ant/DirectoryScanner.java src/tests/junit/org/apache/tools/ant/taskdefs/DefaultExcludesTest.java
Date Thu, 05 Aug 2010 04:55:55 GMT
Author: bodewig
Date: Thu Aug  5 04:55:55 2010
New Revision: 982469

URL: http://svn.apache.org/viewvc?rev=982469&view=rev
Log:
add Git, Mercurial and Bazaar files/dirs to defaultexcludes.  Submitted by Ville Skyttä.
 PR 49624

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/docs/manual/dirtasks.html
    ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/DefaultExcludesTest.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=982469&r1=982468&r2=982469&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Aug  5 04:55:55 2010
@@ -42,6 +42,10 @@ Changes that could break older environme
    of Ant 1.8.1.
    Bugzilla Report 49373.
 
+ * The files and directories used by Git, Mercurial and Bazaar to
+   store their information are now excluded by the defaultexcludes.
+   Bugzilla Report 49624.
+
 Fixed bugs:
 -----------
 

Modified: ant/core/trunk/docs/manual/dirtasks.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/dirtasks.html?rev=982469&r1=982468&r2=982469&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/dirtasks.html (original)
+++ ant/core/trunk/docs/manual/dirtasks.html Thu Aug  5 04:55:55 2010
@@ -265,7 +265,7 @@ as an implicit fileset.</p>
 
 <h3><a name="defaultexcludes">Default Excludes</a></h3>
 <p>There are a set of definitions that are excluded by default from all
-directory-based tasks. They are:</p>
+directory-based tasks. As of Ant 1.8.1 they are:</p>
 <pre>
      **/*~
      **/#*#
@@ -282,6 +282,23 @@ directory-based tasks. They are:</p>
      **/.svn/**
      **/.DS_Store
 </pre>
+<p>Ant 1.8.2 adds the folllowing default excludes:</p>
+<pre>
+     **/.git
+     **/.git/**
+     **/.gitattributes
+     **/.gitignore
+     **/.gitmodules
+     **/.hg
+     **/.hg/**
+     **/.hgignore
+     **/.hgsub
+     **/.hgsubstate
+     **/.hgtags
+     **/.bzr
+     **/.bzr/**
+     **/.bzrignore
+</pre>
 <p>If you do not want these default excludes applied, you may disable
 them with the <code>defaultexcludes=&quot;no&quot;</code>
 attribute.</p>

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=982469&r1=982468&r2=982469&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Thu Aug  5 04:55:55
2010
@@ -170,6 +170,26 @@ public class DirectoryScanner
         SelectorUtils.DEEP_TREE_MATCH + "/.svn",
         SelectorUtils.DEEP_TREE_MATCH + "/.svn/" + SelectorUtils.DEEP_TREE_MATCH,
 
+        // Git
+        SelectorUtils.DEEP_TREE_MATCH + "/.git",
+        SelectorUtils.DEEP_TREE_MATCH + "/.git/" + SelectorUtils.DEEP_TREE_MATCH,
+        SelectorUtils.DEEP_TREE_MATCH + "/.gitattributes",
+        SelectorUtils.DEEP_TREE_MATCH + "/.gitignore",
+        SelectorUtils.DEEP_TREE_MATCH + "/.gitmodules",
+
+        // Mercurial
+        SelectorUtils.DEEP_TREE_MATCH + "/.hg",
+        SelectorUtils.DEEP_TREE_MATCH + "/.hg/" + SelectorUtils.DEEP_TREE_MATCH,
+        SelectorUtils.DEEP_TREE_MATCH + "/.hgignore",
+        SelectorUtils.DEEP_TREE_MATCH + "/.hgsub",
+        SelectorUtils.DEEP_TREE_MATCH + "/.hgsubstate",
+        SelectorUtils.DEEP_TREE_MATCH + "/.hgtags",
+
+        // Bazaar
+        SelectorUtils.DEEP_TREE_MATCH + "/.bzr",
+        SelectorUtils.DEEP_TREE_MATCH + "/.bzr/" + SelectorUtils.DEEP_TREE_MATCH,
+        SelectorUtils.DEEP_TREE_MATCH + "/.bzrignore",
+
         // Mac
         SelectorUtils.DEEP_TREE_MATCH + "/.DS_Store"
     };

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/DefaultExcludesTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/DefaultExcludesTest.java?rev=982469&r1=982468&r2=982469&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/DefaultExcludesTest.java
(original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/DefaultExcludesTest.java
Thu Aug  5 04:55:55 2010
@@ -53,6 +53,20 @@ public class DefaultExcludesTest extends
                           "**/vssver.scc",
                           "**/.svn",
                           "**/.svn/**",
+                          "**/.git",
+                          "**/.git/**",
+                          "**/.gitattributes",
+                          "**/.gitignore",
+                          "**/.gitmodules",
+                          "**/.hg",
+                          "**/.hg/**",
+                          "**/.hgignore",
+                          "**/.hgsub",
+                          "**/.hgsubstate",
+                          "**/.hgtags",
+                          "**/.bzr",
+                          "**/.bzr/**",
+                          "**/.bzrignore",
                           "**/.DS_Store"};
         project.executeTarget("test1");
         assertEquals("current default excludes", expected, DirectoryScanner.getDefaultExcludes());
@@ -74,6 +88,20 @@ public class DefaultExcludesTest extends
                           "**/vssver.scc",
                           "**/.svn",
                           "**/.svn/**",
+                          "**/.git",
+                          "**/.git/**",
+                          "**/.gitattributes",
+                          "**/.gitignore",
+                          "**/.gitmodules",
+                          "**/.hg",
+                          "**/.hg/**",
+                          "**/.hgignore",
+                          "**/.hgsub",
+                          "**/.hgsubstate",
+                          "**/.hgtags",
+                          "**/.bzr",
+                          "**/.bzr/**",
+                          "**/.bzrignore",
                           "**/.DS_Store",
                           "foo"};
         project.executeTarget("test2");
@@ -96,6 +124,20 @@ public class DefaultExcludesTest extends
                           "**/vssver.scc",
                           "**/.svn",
                           "**/.svn/**",
+                          "**/.git",
+                          "**/.git/**",
+                          "**/.gitattributes",
+                          "**/.gitignore",
+                          "**/.gitmodules",
+                          "**/.hg",
+                          "**/.hg/**",
+                          "**/.hgignore",
+                          "**/.hgsub",
+                          "**/.hgsubstate",
+                          "**/.hgtags",
+                          "**/.bzr",
+                          "**/.bzr/**",
+                          "**/.bzrignore",
                           "**/.DS_Store"};
         project.executeTarget("test3");
         assertEquals("current default excludes", expected, DirectoryScanner.getDefaultExcludes());



Mime
View raw message