1 | <!--
|
---|
2 | Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | contributor license agreements. See the NOTICE file distributed with
|
---|
4 | this work for additional information regarding copyright ownership.
|
---|
5 | The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | (the "License"); you may not use this file except in compliance with
|
---|
7 | the License. You may obtain a copy of the License at
|
---|
8 |
|
---|
9 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 |
|
---|
11 | Unless required by applicable law or agreed to in writing, software
|
---|
12 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | See the License for the specific language governing permissions and
|
---|
15 | limitations under the License.
|
---|
16 | -->
|
---|
17 | <html>
|
---|
18 |
|
---|
19 | <head>
|
---|
20 | <meta http-equiv="Content-Language" content="en-us">
|
---|
21 | <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
---|
22 | <title>Patch Task</title>
|
---|
23 | </head>
|
---|
24 |
|
---|
25 | <body>
|
---|
26 |
|
---|
27 | <h2><a name="patch">Patch</a></h2>
|
---|
28 | <h3>Description</h3>
|
---|
29 | <p>Applies a diff file to originals. ; requires "patch" to be
|
---|
30 | on the execution path. </p>
|
---|
31 | <h3>Parameters</h3>
|
---|
32 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
33 | <tr>
|
---|
34 | <td valign="top"><b>Attribute</b></td>
|
---|
35 | <td valign="top"><b>Description</b></td>
|
---|
36 | <td align="center" valign="top"><b>Required</b></td>
|
---|
37 | </tr>
|
---|
38 | <tr>
|
---|
39 | <td valign="top">patchfile</td>
|
---|
40 | <td valign="top">the file that includes the diff output</td>
|
---|
41 | <td align="center" valign="top">Yes</td>
|
---|
42 | </tr>
|
---|
43 | <tr>
|
---|
44 | <td valign="top">originalfile</td>
|
---|
45 | <td valign="top">the file to patch</td>
|
---|
46 | <td align="center" valign="top">No, tries to guess it from the diff
|
---|
47 | file</td>
|
---|
48 | </tr>
|
---|
49 | <tr>
|
---|
50 | <td valign="top">destfile</td>
|
---|
51 | <td valign="top">the file to send the output to instead of
|
---|
52 | patching the file(s) in place. <em>since Ant 1.6</em></td>
|
---|
53 | <td align="center" valign="top">No.</td>
|
---|
54 | </tr>
|
---|
55 | <tr>
|
---|
56 | <td valign="top">backups</td>
|
---|
57 | <td valign="top">Keep backups of the unpatched files</td>
|
---|
58 | <td align="center" valign="top">No</td>
|
---|
59 | </tr>
|
---|
60 | <tr>
|
---|
61 | <td valign="top">quiet</td>
|
---|
62 | <td valign="top">Work silently unless an error occurs</td>
|
---|
63 | <td align="center" valign="top">No</td>
|
---|
64 | </tr>
|
---|
65 | <tr>
|
---|
66 | <td valign="top">reverse</td>
|
---|
67 | <td valign="top">Assume patch was created with old and new files
|
---|
68 | swapped.</td>
|
---|
69 | <td align="center" valign="top">No</td>
|
---|
70 | </tr>
|
---|
71 | <tr>
|
---|
72 | <td valign="top">ignorewhitespace</td>
|
---|
73 | <td valign="top">Ignore whitespace differences.</td>
|
---|
74 | <td align="center" valign="top">No</td>
|
---|
75 | </tr>
|
---|
76 | <tr>
|
---|
77 | <td valign="top">strip</td>
|
---|
78 | <td valign="top">Strip the smallest prefix containing <i>num</i> leading
|
---|
79 | slashes from filenames.</td>
|
---|
80 | <td align="center" valign="top">No</td>
|
---|
81 | </tr>
|
---|
82 | <tr>
|
---|
83 | <td valign="top">dir</td>
|
---|
84 | <td valign="top">The directory in which to run the patch command.</td>
|
---|
85 | <td align="center" valign="top">No, default is the project's basedir.</td>
|
---|
86 | </tr>
|
---|
87 | </table>
|
---|
88 | <h3>Examples</h3>
|
---|
89 | <pre> <patch patchfile="module.1.0-1.1.patch"/></pre>
|
---|
90 | <p>applies the diff included in <i>module.1.0-1.1.patch</i> to the
|
---|
91 | files in base directory guessing the filename(s) from the diff output.</p>
|
---|
92 | <pre> <patch patchfile="module.1.0-1.1.patch" strip="1"/></pre>
|
---|
93 | <p>like above but one leading directory part will be removed. i.e. if
|
---|
94 | the diff output looked like</p>
|
---|
95 | <pre>
|
---|
96 | --- a/mod1.0/A Mon Jun 5 17:28:41 2000
|
---|
97 | +++ a/mod1.1/A Mon Jun 5 17:28:49 2000
|
---|
98 | </pre>
|
---|
99 | the leading <i>a/</i> will be stripped.
|
---|
100 |
|
---|
101 |
|
---|
102 | </body>
|
---|
103 | </html>
|
---|
104 |
|
---|