From 88e204df812543aa6fd2f530ae0a15ae65e26192 Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Sun, 25 May 2003 09:43:53 +0000 Subject: [PATCH] Make ignoreFileTimes default to true in DifferentSelector to preserve backward compatibility in the behavior of the selector and also make the selector more user friendly. One expects that most users want to ignore file timestamps. PR: 20205 Submitted by: Jeff Turner (jefft at apache dot org) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274615 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTypes/selectors.html | 18 +++++++++--------- .../ant/types/selectors/DifferentSelector.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/manual/CoreTypes/selectors.html b/docs/manual/CoreTypes/selectors.html index 09374f815..5870d6993 100755 --- a/docs/manual/CoreTypes/selectors.html +++ b/docs/manual/CoreTypes/selectors.html @@ -271,8 +271,8 @@
  1. If there is no 'other' file, it's different.
  2. Files with different lengths are different. -
  3. Files with the same timestamp are the same, unless ignoreFileTimes - is set. This feature is useful to keep the selection fast. +
  4. If ignoreFileTimes is turned off, then differing file + timestamps will cause files to be regarded as different.
  5. Finally a byte-for-byte check is run against the two files
@@ -308,6 +308,13 @@ Yes + + ignoreFileTimes + Whether to use file times in the comparison or not. + Default is true (time differences are ignored). + + No + granularity The number of milliseconds leeway to give before @@ -317,13 +324,6 @@ No - - ignoreFileTimes - Whether to use file times in the comparison or not. - Default is false (time differences are significant). - - No -

Here is an example of how to use the Different Selector:

diff --git a/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java b/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java index d7410613f..73208962e 100644 --- a/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java +++ b/src/main/org/apache/tools/ant/types/selectors/DifferentSelector.java @@ -81,7 +81,7 @@ public class DifferentSelector extends MappingSelector { private FileUtils fileUtils= FileUtils.newFileUtils(); - private boolean ignoreFileTimes=false; + private boolean ignoreFileTimes=true; /**