stevel      2003/10/02 18:10:22

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional
                        ReplaceRegExp.java
  Log:
  More diagnostics. Because some of us never get regexps right first time
  
  Revision  Changes    Path
  1.28      +4 -0      
ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
  
  Index: ReplaceRegExp.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ReplaceRegExp.java        17 Sep 2003 20:11:43 -0000      1.27
  +++ ReplaceRegExp.java        3 Oct 2003 01:10:22 -0000       1.28
  @@ -306,6 +306,7 @@
           Regexp regexp = r.getRegexp(getProject());
   
           if (regexp.matches(input, options)) {
  +            log("Found match; substituting",Project.MSG_DEBUG);
               res = regexp.substitute(input, s.getExpression(getProject()),
                                       options);
           }
  @@ -436,6 +437,7 @@
               w = null;
   
               if (changes) {
  +                log("File has changed; saving the updated 
file",Project.MSG_VERBOSE);
                   try {
                       fileUtils.rename(temp, f);
                       temp = null;
  @@ -443,6 +445,8 @@
                       throw new BuildException("Couldn't rename temporary file 
"
                                                + temp, getLocation());
                   }
  +            } else {
  +                log("No change made",Project.MSG_DEBUG);
               }
           } finally {
               try {
  
  
  

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

Reply via email to