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 to false.

ignorewhitespace (all, boolean, N)

If true, ignore whitespace differences when applying the patch file. Defaults to false.

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 to false.

reverse (all, boolean, N)

If true, assume patch file was created with old and new files swapped. Defaults to false.

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.