git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274783 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -467,6 +467,9 @@ Other changes: | |||||
| enable it to expand archives created with filenames using an encoding | enable it to expand archives created with filenames using an encoding | ||||
| other than UTF8. Bugzilla Report 10504. | 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 | Changes from Ant 1.5.2 to Ant 1.5.3 | ||||
| =================================== | =================================== | ||||
| @@ -29,6 +29,12 @@ | |||||
| <td align="center" valign="top">No, tries to guess it from the diff | <td align="center" valign="top">No, tries to guess it from the diff | ||||
| file</td> | file</td> | ||||
| </tr> | </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> | <tr> | ||||
| <td valign="top">backups</td> | <td valign="top">backups</td> | ||||
| <td valign="top">Keep backups of the unpatched files</td> | <td valign="top">Keep backups of the unpatched files</td> | ||||
| @@ -75,7 +81,7 @@ the diff output looked like</p> | |||||
| </pre> | </pre> | ||||
| the leading <i>a/</i> will be stripped. | the leading <i>a/</i> will be stripped. | ||||
| <hr> | <hr> | ||||
| <p align="center">Copyright © 2000-2002 Apache Software Foundation. All rights | |||||
| <p align="center">Copyright © 2000-2003 Apache Software Foundation. All rights | |||||
| Reserved.</p> | Reserved.</p> | ||||
| </body> | </body> | ||||
| @@ -1,7 +1,7 @@ | |||||
| /* | /* | ||||
| * The Apache Software License, Version 1.1 | * 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. | * reserved. | ||||
| * | * | ||||
| * Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
| @@ -85,6 +85,19 @@ public class Patch extends Task { | |||||
| originalFile = 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); | |||||
| } | |||||
| } | |||||
| /** | /** | ||||
| * The file containing the diff output; required. | * The file containing the diff output; required. | ||||
| */ | */ | ||||