antoine     2003/12/18 00:54:15

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        Checksum.java
               src/testcases/org/apache/tools/ant/taskdefs Tag:
                        ANT_16_BRANCH ChecksumTest.java
               src/etc/testcases/taskdefs Tag: ANT_16_BRANCH checksum.xml
  Log:
  Merge from HEAD
  Make checksum work with nested filesets and no total property
  Make checksum less loud, downgrading message calculating checksum to verbose
  PR: 25606
  PR: 25607
  Submitted by: Ariel Backenroth ( abackenr at interwoven dot com )
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.21 +8 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.20
  retrieving revision 1.503.2.21
  diff -u -r1.503.2.20 -r1.503.2.21
  --- WHATSNEW  17 Dec 2003 16:02:56 -0000      1.503.2.20
  +++ WHATSNEW  18 Dec 2003 08:54:14 -0000      1.503.2.21
  @@ -8,6 +8,10 @@
     rather than blocking. If you run such a process and rely on it blocking, as
     it would do in Ant 1.5, you may have problem.
   
  +* <checksum> message "calculating checksum" downgraded to MSG_VERBOSE
  +  to limit output in case of large filesets.
  +  Bugzilla Report 25607.
  +
   * Change logging level of captured standard error output from MSG_ERR to 
MSG_WARN.
     Previous some standard error was output as MSG_ERR and some as MSG_WARN 
(namely
     standard error from exec and forked jvms).
  @@ -20,6 +24,10 @@
   
   * <xmlcatalog> Wrong file location to URL conversion in XMLCatalog.
     Bugzilla Report 23913.
  +
  +* <checksum> was throwing a null pointer exception, when used with nested 
filesets
  +  and totalproperty attribute not set.
  +  Bugzilla Report 25606.
   
   Other changes:
   --------------
  
  
  
  No                   revision
  No                   revision
  1.34.2.1  +2 -2      ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  
  Index: Checksum.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v
  retrieving revision 1.34
  retrieving revision 1.34.2.1
  diff -u -r1.34 -r1.34.2.1
  --- Checksum.java     13 Sep 2003 12:58:33 -0000      1.34
  +++ Checksum.java     18 Dec 2003 08:54:14 -0000      1.34.2.1
  @@ -374,7 +374,7 @@
                   String[] srcFiles = ds.getIncludedFiles();
                   for (int j = 0; j < srcFiles.length; j++) {
                       File src = new File(fs.getDir(getProject()), 
srcFiles[j]);
  -                    if (totalproperty != null) {
  +                    if (totalproperty != null || todir != null) {
                           // Use '/' to calculate digest based on file name.
                           // This is required in order to get the same result
                           // on different platforms.
  @@ -467,7 +467,7 @@
                   messageDigest.reset();
                   File src = (File) e.nextElement();
                   if (!isCondition) {
  -                    log("Calculating " + algorithm + " checksum for " + src);
  +                    log("Calculating " + algorithm + " checksum for " + src, 
Project.MSG_VERBOSE);
                   }
                   fis = new FileInputStream(src);
                   DigestInputStream dis = new DigestInputStream(fis,
  
  
  
  No                   revision
  No                   revision
  1.6.2.1   +4 -1      
ant/src/testcases/org/apache/tools/ant/taskdefs/ChecksumTest.java
  
  Index: ChecksumTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ChecksumTest.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- ChecksumTest.java 24 Jun 2003 15:40:28 -0000      1.6
  +++ ChecksumTest.java 18 Dec 2003 08:54:14 -0000      1.6.2.1
  @@ -125,6 +125,9 @@
           expectPropertySet("verifyFromProperty", "verify", "true");
       }
   
  +    public void testVerifyChecksumdirNoTotal() {
  +        executeTarget("verifyChecksumdirNoTotal");
  +    }
       private void testVerify(String target) {
           assertNull(project.getProperty("logo.MD5"));
           assertNull(project.getProperty("no.logo.MD5"));
  
  
  
  No                   revision
  No                   revision
  1.5.2.1   +8 -0      ant/src/etc/testcases/taskdefs/checksum.xml
  
  Index: checksum.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/checksum.xml,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- checksum.xml      24 Jun 2003 15:40:28 -0000      1.5
  +++ checksum.xml      18 Dec 2003 08:54:14 -0000      1.5.2.1
  @@ -65,4 +65,12 @@
         </fileset>
       </checksum>
     </target>
  +    <!-- bug report 25606 -->
  +    <target name="verifyChecksumdirNoTotal">
  +      <checksum todir="${basedir}/checksum/checksums">
  +        <fileset dir="${basedir}/checksum">
  +          <exclude name="**/*.MD5"/>
  +        </fileset>
  +      </checksum>
  +    </target>
   </project>
  
  
  

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

Reply via email to