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() |
---|
string
The text description of the taskgetLocation() : \Location
Used by BuildException to give detailed error messages.
inherited_from | \Task::getLocation() |
---|
\Location
The location object describing the position of this
task within the buildfile.getProject() : \Project
inherited_from | \ProjectComponent::getProject() |
---|---|
inherited_from | \Task::getProject() |
\Project
Reference to current porject objectgetRuntimeConfigurableWrapper() : \RuntimeConfigurable
inherited_from | \Task::getRuntimeConfigurableWrapper() |
---|
\RuntimeConfigurable
The wrapper object used by this taskgetTaskName() : string
inherited_from | \Task::getTaskName() |
---|
string
Name of this taskgetTaskType() : string
inherited_from | \Task::getTaskType() |
---|
string
The 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 | \global\BuildEvent |
---|---|
see | \global\BuildListener |
inherited_from | \Task::log() |
string
The message to log
integer
The 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
bool
If true create backups
setDescription(string $desc)
inherited_from | \Task::setDescription() |
---|
string
The text describing the task
setDestFile(string $file) : void
Optional.
string
File to send the output to
setDir(string $directory) : void
Defaults to the project's base directory.
string
Directory to run the patch command in
setForward(bool $flag) : void
bool
If true set the -N (--forward) option
setFuzz(string $value) : void
Defaults to 0
string
Value 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
bool
If 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.
string
File to patch
setOwningTarget(\Target $target)
setPatchFile(string $file) : void
Required.
string
File 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
bool
If true suppress set the -s option on the patch command
setReverse(bool $flag) : void
Optional, default - false
bool
If true set the -R option on the patch command
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
inherited_from | \Task::setRuntimeConfigurableWrapper() |
---|
setStrip(int $num) : void
patch's --strip option.
int
number of lines to strip
\BuildException |
if num is < 0, or other errors |
---|
setTaskName(string $name) : string
inherited_from | \Task::setTaskName() |
---|
string
string
A string representing the name of this task for logsetTaskType(string $name)
Usually this is the name of the XML tag
inherited_from | \Task::setTaskType() |
---|
string
The 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