You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

patch.html 2.3 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="patch">Patch</a></h2>
  8. <h3>Description</h3>
  9. <p>Applies a diff file to originals.</p>
  10. <h3>Parameters</h3>
  11. <table border="1" cellpadding="2" cellspacing="0">
  12. <tr>
  13. <td valign="top"><b>Attribute</b></td>
  14. <td valign="top"><b>Description</b></td>
  15. <td align="center" valign="top"><b>Required</b></td>
  16. </tr>
  17. <tr>
  18. <td valign="top">patchfile</td>
  19. <td valign="top">the file that includes the diff output</td>
  20. <td align="center" valign="top">Yes</td>
  21. </tr>
  22. <tr>
  23. <td valign="top">originalfile</td>
  24. <td valign="top">the file to patch</td>
  25. <td align="center" valign="top">No, tries to guess it from the diff
  26. file</td>
  27. </tr>
  28. <tr>
  29. <td valign="top">backups</td>
  30. <td valign="top">Keep backups of the unpatched files</td>
  31. <td align="center" valign="top">No</td>
  32. </tr>
  33. <tr>
  34. <td valign="top">quiet</td>
  35. <td valign="top">Work silently unless an error occurs</td>
  36. <td align="center" valign="top">No</td>
  37. </tr>
  38. <tr>
  39. <td valign="top">reverse</td>
  40. <td valign="top">Assume patch was created with old and new files
  41. swapped.</td>
  42. <td align="center" valign="top">No</td>
  43. </tr>
  44. <tr>
  45. <td valign="top">ignorewhitespace</td>
  46. <td valign="top">Ignore whitespace differences.</td>
  47. <td align="center" valign="top">No</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">strip</td>
  51. <td valign="top">Strip the smallest prefix containing <i>num</i> leading
  52. slashes from filenames.</td>
  53. <td align="center" valign="top">No</td>
  54. </tr>
  55. </table>
  56. <h3>Examples</h3>
  57. <pre> &lt;patch patchfile=&quot;module.1.0-1.1.patch&quot;/&gt;</pre>
  58. <p>applies the diff included in <i>module.1.0-1.1.patch</i> to the
  59. files in base directory guessing the filename(s) from the diff output.</p>
  60. <pre> &lt;patch patchfile=&quot;module.1.0-1.1.patch&quot; strip=&quot;1&quot;/&gt;</pre>
  61. <p>like above but one leading directory part will be removed. i.e. if
  62. the diff output looked like</p>
  63. <pre>
  64. --- a/mod1.0/A Mon Jun 5 17:28:41 2000
  65. +++ a/mod1.1/A Mon Jun 5 17:28:49 2000
  66. </pre>
  67. the leading <i>a/</i> will be stripped.
  68. <hr>
  69. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  70. Reserved.</p>
  71. </body>
  72. </html>