Name
patch
Synopsis
Applies a diff
file to originals. CVS includes the
patch
command-line utility, which must be located
on the path for this task to execute.
Attributes
-
backups
(all, boolean, N) If
true
, keep backup copies of unpatched files. Defaults tofalse
.-
ignorewhitespace
(all, boolean, N) If
true
, ignore whitespace differences when applying the patch file. Defaults tofalse
.-
originalfile
(all, File, N) The file to patch.
-
patchfile
(all, File, Y) The file containing the
diff
output.-
quiet
(all, boolean, N) If
true
, work silently unless an error occurs. Defaults tofalse
.-
reverse
(all, boolean, N) If
true
, assume patch file was created with old and new files swapped. Defaults tofalse
.-
strip
(all, int, N) Strips the smallest prefix containing this number of leading slashes from filenames. Equivalent to
patch
’s-p
option.
Content
None.
Example Usage
Apply the diff included in foo.patch
, guessing
filenames from the diff output:
<patch patchfile="foo.patch"/>
See Also
See the cvs task.
Get Ant: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.