bodewig     2004/02/27 06:54:58

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs ExecuteOn.java
  Log:
  <apply> with nested <filelist> didn't check out-of-dateness.
  
  PR: 26985
  
  Revision  Changes    Path
  1.558     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.557
  retrieving revision 1.558
  diff -u -r1.557 -r1.558
  --- WHATSNEW  27 Feb 2004 14:17:41 -0000      1.557
  +++ WHATSNEW  27 Feb 2004 14:54:58 -0000      1.558
  @@ -64,6 +64,9 @@
   * Throw build exception if target repeated in build file, but allow targets
     to be repeated in imported files. 
   
  +* <apply> didn't compare timestamps of source and targetfiles when
  +  using a nested <filelist>.  Bugzilla Report 26985.
  +
   Other changes:
   --------------
   
  
  
  
  1.50      +18 -1     ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  
  Index: ExecuteOn.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- ExecuteOn.java    9 Feb 2004 21:05:19 -0000       1.49
  +++ ExecuteOn.java    27 Feb 2004 14:54:58 -0000      1.50
  @@ -312,7 +312,7 @@
               for (int i = 0; i < filelists.size(); i++) {
                   FileList list = (FileList) filelists.elementAt(i);
                   File base = list.getDir(getProject());
  -                String[] names = list.getFiles(getProject());
  +                String[] names = getFilesAndDirs(list);
   
                   for (int j = 0; j < names.length; j++) {
                       File f = new File(base, names[j]);
  @@ -533,6 +533,23 @@
                                   mapper);
           } else {
               return ds.getIncludedDirectories();
  +        }
  +    }
  +
  +    /**
  +     * Return the list of files or directories from this FileList that
  +     * should be included on the command line.
  +     *
  +     * @since Ant 1.6.2
  +     */
  +    protected String[] getFilesAndDirs(FileList list) {
  +        if (mapper != null) {
  +            SourceFileScanner sfs = new SourceFileScanner(this);
  +            return sfs.restrict(list.getFiles(getProject()),
  +                                list.getDir(getProject()), destDir,
  +                                mapper);
  +        } else {
  +            return list.getFiles(getProject());
           }
       }
   
  
  
  

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

Reply via email to