Patches a file by applying a 'diff' file to it
Requires "patch" to be on the execution path.
| package | phing.tasks.ext |
|---|---|
| author | Andreas Aderhold |
| copyright | 2001,2002 THYRELL. All rights reserved |
| version | $Id$ |
getDescription() : string
| inherited_from | \Task::getDescription() |
|---|
stringThe text description of the taskgetLocation() : \Location
Used by BuildException to give detailed error messages.
| inherited_from | \Task::getLocation() |
|---|
\LocationThe location object describing the position of this
task within the buildfile.getProject() : \Project
| inherited_from | \ProjectComponent::getProject() |
|---|---|
| inherited_from | \Task::getProject() |
\ProjectReference to current porject objectgetRuntimeConfigurableWrapper() : \RuntimeConfigurable
| inherited_from | \Task::getRuntimeConfigurableWrapper() |
|---|
\RuntimeConfigurableThe wrapper object used by this taskgetTaskName() : string
| inherited_from | \Task::getTaskName() |
|---|
stringName of this taskgetTaskType() : string
| inherited_from | \Task::getTaskType() |
|---|
stringThe type of this task (XML Tag)init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
| inherited_from | \Task::init() |
|---|
\BuildException |
|---|
log(string $msg, integer $level)
| see | \BuildEvent |
|---|---|
| see | \BuildListener |
| inherited_from | \Task::log() |
stringThe message to log
integerThe priority of the message
main() : void
This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running phing target1 target2 will run all tasks in target3 twice.
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
\BuildException |
when it all goes a bit pear shaped |
|---|
maybeConfigure()
| inherited_from | \Task::maybeConfigure() |
|---|
perform()
| inherited_from | \Task::perform() |
|---|
setBackups(bool $backups) : void
Optional, default - false
boolIf true create backups
setDescription(string $desc)
| inherited_from | \Task::setDescription() |
|---|
stringThe text describing the task
setDestFile(string $file) : void
Optional.
stringFile to send the output to
setDir(string $directory) : void
Defaults to the project's base directory.
stringDirectory to run the patch command in
setForward(bool $flag) : void
boolIf true set the -N (--forward) option
setFuzz(string $value) : void
Defaults to 0
stringValue of a fuzz factor
setHaltOnFailure(bool $value) : void
The default is "false"
bool"true" if it should halt, otherwise "false"
setIgnoreWhiteSpace(bool $ignore) : void
Default - false
boolIf true ignore whitespace differences
setLocation(\Location $location)
Called by the parser to set location information.
| inherited_from | \Task::setLocation() |
|---|
setOriginalFile(string $file) : void
Optional if it can be inferred from the diff file.
stringFile to patch
setOwningTarget(\Target $target)
setPatchFile(string $file) : void
Required.
stringFile containing the diff output
\BuildException |
if $file not exists |
|---|
setProject(\Project $project)
| inherited_from | \ProjectComponent::setProject() |
|---|---|
| inherited_from | \Task::setProject() |
setQuiet(bool $flag) : void
Optional, default - false
boolIf true suppress set the -s option on the patch command
setReverse(bool $flag) : void
Optional, default - false
boolIf true set the -R option on the patch command
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
| inherited_from | \Task::setRuntimeConfigurableWrapper() |
|---|
setStrip(int $num) : void
patch's --strip option.
intnumber of lines to strip
\BuildException |
if num is < 0, or other errors |
|---|
setTaskName(string $name) : string
| inherited_from | \Task::setTaskName() |
|---|
string
stringA string representing the name of this task for logsetTaskType(string $name)
Usually this is the name of the XML tag
| inherited_from | \Task::setTaskType() |
|---|
stringThe type of this task (XML Tag)
getRegisterSlot(string $slotName)
| inherited_from | \Task::getRegisterSlot() |
|---|
string
$description : string
| inherited_from | \Task::$$description |
|---|
$project : \Project
| inherited_from | \ProjectComponent::$$project |
|---|---|
| inherited_from | \Task::$$project |
$taskName : string
| inherited_from | \Task::$$taskName |
|---|
$taskType : string
| inherited_from | \Task::$$taskType |
|---|
$cmdArgs : array
$haltOnFailure : bool
$originalFile : string
$patchFile : string
$strip : int
CMD : string