Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 99776 invoked by uid 500); 24 May 2003 13:52:50 -0000 Received: (qmail 99773 invoked from network); 24 May 2003 13:52:50 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 24 May 2003 13:52:50 -0000 Received: (qmail 58686 invoked by uid 1652); 24 May 2003 13:52:49 -0000 Date: 24 May 2003 13:52:49 -0000 Message-ID: <20030524135249.58685.qmail@icarus.apache.org> From: antoine@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/docs/manual/CoreTypes selectors.html X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N antoine 2003/05/24 06:52:49 Modified: src/main/org/apache/tools/ant/types/selectors DifferentSelector.java docs/manual/CoreTypes selectors.html Log: While reviewing this contribution, I saw that the original test in line 120 of DifferentSelector.java : if(sameDate && !ignoreFileTimes) { return true; } was wrong. I changed it to if (!sameDate) { return true; } Also, DifferentSelector has no Junit test yet, this should be done. PR: 20205 Submitted by: Jeff Turner (jefft at apache dot org) Revision Changes Path 1.4 +9 -7 ant/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java Index: DifferentSelector.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DifferentSelector.java 10 Feb 2003 14:14:35 -0000 1.3 +++ DifferentSelector.java 24 May 2003 13:52:49 -0000 1.4 @@ -110,14 +110,16 @@ return true; } - //same date if dest timestamp is within granularity of the srcfile - boolean sameDate; - sameDate = destfile.lastModified() >= srcfile.lastModified() - granularity - && destfile.lastModified() <= srcfile.lastModified() + granularity; + if (!ignoreFileTimes) { + //same date if dest timestamp is within granularity of the srcfile + boolean sameDate; + sameDate = destfile.lastModified() >= srcfile.lastModified() - granularity + && destfile.lastModified() <= srcfile.lastModified() + granularity; - //and when ignoreFileTimes is set we claim the files are now equal - if(sameDate && !ignoreFileTimes) { - return true; + // different dates => different files + if(!sameDate) { + return true; + } } //here do a bulk comparison 1.11 +1 -1 ant/docs/manual/CoreTypes/selectors.html Index: selectors.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTypes/selectors.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- selectors.html 14 Apr 2003 07:53:07 -0000 1.10 +++ selectors.html 24 May 2003 13:52:49 -0000 1.11 @@ -320,7 +320,7 @@ ignoreFileTimes Whether to use file times in the comparison or not. - Default is true. + Default is false (time differences are significant). No