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.5 KiB

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