bodewig     2003/07/07 06:05:03

  Modified:    .        WHATSNEW
               docs/manual/CoreTasks patch.html
               src/main/org/apache/tools/ant/taskdefs Patch.java
  Log:
  Add destfile attribute to patch.
  
  Revision  Changes    Path
  1.453     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.452
  retrieving revision 1.453
  diff -u -r1.452 -r1.453
  --- WHATSNEW  7 Jul 2003 08:18:38 -0000       1.452
  +++ WHATSNEW  7 Jul 2003 13:05:02 -0000       1.453
  @@ -467,6 +467,9 @@
     enable it to expand archives created with filenames using an encoding
     other than UTF8.  Bugzilla Report 10504.
   
  +* <patch> has a new attribute destfile that can be used to create a new
  +  file instead of patching files in place.
  +
   Changes from Ant 1.5.2 to Ant 1.5.3
   ===================================
   
  
  
  
  1.9       +7 -1      ant/docs/manual/CoreTasks/patch.html
  
  Index: patch.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/patch.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- patch.html        22 Jun 2002 23:38:27 -0000      1.8
  +++ patch.html        7 Jul 2003 13:05:03 -0000       1.9
  @@ -30,6 +30,12 @@
         file</td>
     </tr>
     <tr>
  +    <td valign="top">destfile</td> 
  +    <td valign="top">the file to send the output to instead of
  +      patching the file(s) in place.  <em>since Ant 1.6</em></td>
  +    <td align="center" valign="top">No.</td>
  +  </tr>
  +  <tr>
       <td valign="top">backups</td> 
       <td valign="top">Keep backups of the unpatched files</td>
       <td align="center" valign="top">No</td>
  @@ -75,7 +81,7 @@
   </pre> 
   the leading <i>a/</i> will be stripped.
   <hr>
  -<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All 
rights
  +<p align="center">Copyright &copy; 2000-2003 Apache Software Foundation. All 
rights
   Reserved.</p>
   
   </body>
  
  
  
  1.23      +14 -1     ant/src/main/org/apache/tools/ant/taskdefs/Patch.java
  
  Index: Patch.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Patch.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Patch.java        6 Jul 2003 09:57:36 -0000       1.22
  +++ Patch.java        7 Jul 2003 13:05:03 -0000       1.23
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000,2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000,2002-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -83,6 +83,19 @@
        */
       public void setOriginalfile(File file) {
           originalFile = file;
  +    }
  +
  +    /**
  +     * The name of a file to send the output to, instead of patching
  +     * the file(s) in place; optional.
  +     *
  +     * @since Ant 1.6
  +     */
  +    public void setDestfile(File file) {
  +        if (file != null) {
  +            cmd.createArgument().setValue("-o");
  +            cmd.createArgument().setFile(file);
  +        }
       }
   
       /**
  
  
  

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

Reply via email to