source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/CoreTasks/patch.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.8 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Patch Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="patch">Patch</a></h2>
12<h3>Description</h3>
13<p>Applies a diff file to originals. ; requires "patch" to be
14 on the execution path. </p>
15<h3>Parameters</h3>
16<table border="1" cellpadding="2" cellspacing="0">
17 <tr>
18 <td valign="top"><b>Attribute</b></td>
19 <td valign="top"><b>Description</b></td>
20 <td align="center" valign="top"><b>Required</b></td>
21 </tr>
22 <tr>
23 <td valign="top">patchfile</td>
24 <td valign="top">the file that includes the diff output</td>
25 <td align="center" valign="top">Yes</td>
26 </tr>
27 <tr>
28 <td valign="top">originalfile</td>
29 <td valign="top">the file to patch</td>
30 <td align="center" valign="top">No, tries to guess it from the diff
31 file</td>
32 </tr>
33 <tr>
34 <td valign="top">destfile</td>
35 <td valign="top">the file to send the output to instead of
36 patching the file(s) in place. <em>since Ant 1.6</em></td>
37 <td align="center" valign="top">No.</td>
38 </tr>
39 <tr>
40 <td valign="top">backups</td>
41 <td valign="top">Keep backups of the unpatched files</td>
42 <td align="center" valign="top">No</td>
43 </tr>
44 <tr>
45 <td valign="top">quiet</td>
46 <td valign="top">Work silently unless an error occurs</td>
47 <td align="center" valign="top">No</td>
48 </tr>
49 <tr>
50 <td valign="top">reverse</td>
51 <td valign="top">Assume patch was created with old and new files
52 swapped.</td>
53 <td align="center" valign="top">No</td>
54 </tr>
55 <tr>
56 <td valign="top">ignorewhitespace</td>
57 <td valign="top">Ignore whitespace differences.</td>
58 <td align="center" valign="top">No</td>
59 </tr>
60 <tr>
61 <td valign="top">strip</td>
62 <td valign="top">Strip the smallest prefix containing <i>num</i> leading
63 slashes from filenames.</td>
64 <td align="center" valign="top">No</td>
65 </tr>
66 <tr>
67 <td valign="top">dir</td>
68 <td valign="top">The directory in which to run the patch command.</td>
69 <td align="center" valign="top">No, default is the project's basedir.</td>
70 </tr>
71</table>
72<h3>Examples</h3>
73<pre> &lt;patch patchfile=&quot;module.1.0-1.1.patch&quot;/&gt;</pre>
74<p>applies the diff included in <i>module.1.0-1.1.patch</i> to the
75files in base directory guessing the filename(s) from the diff output.</p>
76<pre> &lt;patch patchfile=&quot;module.1.0-1.1.patch&quot; strip=&quot;1&quot;/&gt;</pre>
77<p>like above but one leading directory part will be removed. i.e. if
78the diff output looked like</p>
79<pre>
80--- a/mod1.0/A Mon Jun 5 17:28:41 2000
81+++ a/mod1.1/A Mon Jun 5 17:28:49 2000
82</pre>
83the leading <i>a/</i> will be stripped.
84<hr>
85<p align="center">Copyright &copy; 2000-2004 The Apache Software Foundation. All rights
86Reserved.</p>
87
88</body>
89</html>
90
Note: See TracBrowser for help on using the repository browser.