C.44 PatchTask
Prev | Appendix C. Optional tasks | Next

## C.44 PatchTask

The `PatchTask` uses the patch program to apply diff file to originals.

NB: the `patch` program must be in the system path!

Table C.52: Attributes

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`patchfile` | `String` | File that includes the diff output | n/a | Yes
`originalfile` | `String` | File to patch. If not specified Task tries to guess it from the diff file | none | No
`destfile` | `String` | File to send the output to instead of patching the file in place | none | No
`backups` | `Boolean` | Keep backups of the unpatched files | `false` | No
`quiet` | `Boolean` | Work silently unless an error occurs | `false` | No
`reverse` | `Boolean` | Assume patch was created with old and new files swapped | `false` | No
`ignorewhitespace` | `Boolean` | Ignore whitespace differences | `false` | No
`strip` | `Integer` | Strip the smallest prefix containing specified number of leading slashes from filenames | none | No
`dir` | `String` | The directory in which to run the patch command | none | No
`haltonfailure` | `Boolean` | Stop the build process if the patching process encounters an error. | `false` | No

### C.44.1 Example

    <patch
      patchfile="/path/to/patches/file.ext.patch"
      dir="/path/to/original"
    />

Apply "file.ext.path" to original file locataed in "/path/to/original" folder.

Prev | Up | Next
C.43 ParallelTask | Home | C.45 PDOSQLExecTask