Author: peterreilly
Date: Tue Jul 17 11:31:53 2007
New Revision: 557009

URL: http://svn.apache.org/viewvc?view=rev&rev=557009
Log:
Bugzilla: 42802, Modified selector doesn't update the cache if only one file 
has changed

Added:
    
ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/modified-selector-test.xml
Modified:
    ant/core/branches/ANT_17_BRANCH/CONTRIBUTORS
    ant/core/branches/ANT_17_BRANCH/WHATSNEW
    ant/core/branches/ANT_17_BRANCH/contributors.xml
    
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java

Modified: ant/core/branches/ANT_17_BRANCH/CONTRIBUTORS
URL: 
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/CONTRIBUTORS?view=diff&rev=557009&r1=557008&r2=557009
==============================================================================
Binary files - no diff available.

Modified: ant/core/branches/ANT_17_BRANCH/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/WHATSNEW?view=diff&rev=557009&r1=557008&r2=557009
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/WHATSNEW (original)
+++ ant/core/branches/ANT_17_BRANCH/WHATSNEW Tue Jul 17 11:31:53 2007
@@ -102,6 +102,9 @@
 * ant script, cd may output to stdout.
   Bugzilla 42739.
 
+* Modified selector doesn't update the cache if only one file has changed.
+  Bugzilla 42802.
+
 Other changes:
 --------------
 * <script> now has basic support for JavaFX scripts

Modified: ant/core/branches/ANT_17_BRANCH/contributors.xml
URL: 
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/contributors.xml?view=diff&rev=557009&r1=557008&r2=557009
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/contributors.xml (original)
+++ ant/core/branches/ANT_17_BRANCH/contributors.xml Tue Jul 17 11:31:53 2007
@@ -900,6 +900,10 @@
     <last>Vaughn</last>
   </name>
   <name>
+    <first>Roman</first>
+    <last>Ivashin</last>
+  </name>
+  <name>
     <first>Ronen</first>
     <last>Mashal</last>
   </name>

Modified: 
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
URL: 
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java?view=diff&rev=557009&r1=557008&r2=557009
==============================================================================
--- 
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
 (original)
+++ 
ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
 Tue Jul 17 11:31:53 2007
@@ -522,7 +522,7 @@
     * save the cache file
     */
     protected void saveCache() {
-        if (getModified() > 1) {
+        if (getModified() > 0) {
             cache.save();
             setModified(0);
         }

Added: 
ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/modified-selector-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/modified-selector-test.xml?view=auto&rev=557009
==============================================================================
--- 
ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/modified-selector-test.xml
 (added)
+++ 
ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/modified-selector-test.xml
 Tue Jul 17 11:31:53 2007
@@ -0,0 +1,22 @@
+<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit">
+
+  <import file="../antunit-base.xml"/>
+  <property name="test-build-dir"
+            location="../../../../build/ant-unit/modified-selector"/>
+
+  <target name="test-one-file">
+    <delete dir="${test-build-dir}"/>
+    <mkdir dir="${test-build-dir}"/>
+    <copy todir="${test-build-dir}" overwrite="yes">
+      <fileset dir="." includes="modified-selector-test.xml">
+        <modified update="true">
+          <param name="cache.cachefile" 
value="${test-build-dir}/cc.properties"/>
+        </modified>
+      </fileset>
+    </copy>
+
+    <au:assertTrue>
+      <available file="${test-build-dir}/cc.properties"/>
+    </au:assertTrue>
+  </target>
+</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to