Patches a file by applying a 'diff' file to it
Requires "patch" to be on the execution path.
package |
phing.tasks.ext |
---|
getDescription() : string
string
The text description of the task
getLocation() : \Location
getOwningTarget() : \Target
getProject() : \Project
getRegisterSlot(string $slotName)
string
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getTaskName() : string
string
Name of this task
getTaskType() : string
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.
throws | |
---|---|
log(string $msg, integer $level = \Project::MSG_INFO)
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
perform()
setBackups(boolean $backups) : void
Optional, default - false
boolean
If true create backups
setDescription(string $desc)
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(boolean $flag) : void
boolean
If true set the -N (--forward) option
setFuzz(string $value) : void
Defaults to 0
string
Value of a fuzz factor
setHaltOnFailure(boolean $value) : void
The default is "false"
boolean
"true" if it should halt, otherwise "false"
setIgnoreWhiteSpace(boolean $ignore) : void
Default - false
boolean
If true ignore whitespace differences
setLocation(\Location $location)
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.
throws |
if $file not exists |
---|
string
File containing the diff output
setProject(\Project $project)
setQuiet(boolean $flag) : void
Optional, default - false
boolean
If true suppress set the -s option on the patch command
setReverse(boolean $flag) : void
Optional, default - false
boolean
If true set the -R option on the patch command
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setStrip(integer $num) : void
patch's --strip option.
throws |
if num is < 0, or other errors |
---|
integer
number of lines to strip
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
CMD
var |
---|
originalFile : string
var |
---|
string
patchFile : string
var |
---|
string
strip : integer
var |
---|
integer
cmdArgs : array
var |
---|
array
haltOnFailure : boolean
var |
---|
boolean
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project