tasks/ext/svn/SvnLastRevisionTask.php
\SvnLastRevisionTask
Stores the number of the last revision of a workingcopy in a property
Use {@link Project#createTask} to register a new Task.
- Parent(s)
- \SvnBaseTask < \Task < \ProjectComponent
- See
- \VersionControl_SVN
- Author
- Michiel Rook
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Since
- 2.1.0
- Version
- $Id: 74d61db8c11978a2383f071b7ab7ed0afae6953c $
Properties

string
$description= ''
- Type
- string
- Inherited_from
- \Task::$$description
- Inherited_from
- \SvnBaseTask::$$description

$fetchMode= 'VERSIONCONTROL_SVN_FETCHMODE_ASSOC'
VERSIONCONTROL_SVN_FETCHMODE_ASSOCDetails- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$fetchMode

\Location
$location= ''
- Type
- \Location
- Inherited_from
- \Task::$$location
- Inherited_from
- \SvnBaseTask::$$location

$mode= '""'
""Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$mode

\Project
$project= 'null'
Holds a reference to the project that a project component (a task, a target, etc.) belongs to
A reference to the current project instanceInherited from: \ProjectComponent::$$project\Task::$$project\SvnBaseTask::$$projectnullDetails- Type
- \Project
- Inherited_from
- \ProjectComponent::$$project
- Inherited_from
- \Task::$$project
- Inherited_from
- \SvnBaseTask::$$project

$repositoryUrl= '""'
""Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$repositoryUrl

$svn= 'NULL'
NULLDetails- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$svn

$svnArgs= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$svnArgs

$svnPath= '"/usr/bin/svn"'
"/usr/bin/svn"Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$svnPath

$svnSwitches= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$svnSwitches

\Target
$target= ''
- Type
- \Target
- Inherited_from
- \Task::$$target
- Inherited_from
- \SvnBaseTask::$$target

string
$taskName= ''
- Type
- string
- Inherited_from
- \Task::$$taskName
- Inherited_from
- \SvnBaseTask::$$taskName

string
$taskType= ''
- Type
- string
- Inherited_from
- \Task::$$taskType
- Inherited_from
- \SvnBaseTask::$$taskType

$toDir= '""'
""Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$toDir

$workingCopy= '""'
""Details- Type
- n/a
- Inherited_from
- \SvnBaseTask::$$workingCopy

\RuntimeConfigurable
$wrapper= ''
- Type
- \RuntimeConfigurable
- Inherited_from
- \Task::$$wrapper
- Inherited_from
- \SvnBaseTask::$$wrapper
Methods

getDescription(
)
:
stringReturns the textual description of the task
Inherited from: \Task::getDescription()\SvnBaseTask::getDescription()| Type | Description |
|---|---|
| string | The text description of the task |

getLocation(
)
:
\LocationReturns the location within the buildfile this task occurs. Used by {@link BuildException} to give detailed error messages.
Inherited from: \Task::getLocation()\SvnBaseTask::getLocation()| Type | Description |
|---|---|
| \Location | The location object describing the position of this task within the buildfile. |

getOwningTarget(
)
:
\TargetReturns the owning target of this task.
Inherited from: \Task::getOwningTarget()\SvnBaseTask::getOwningTarget()| Type | Description |
|---|---|
| \Target | The target object that owns this task |

getProject(
)
:
\ProjectReturns a reference to current project
Inherited from: \ProjectComponent::getProject()\Task::getProject()\SvnBaseTask::getProject()| Type | Description |
|---|---|
| \Project | Reference to current porject object |

getRuntimeConfigurableWrapper(
)
:
\RuntimeConfigurableReturns the wrapper object for runtime configuration
Inherited from: \Task::getRuntimeConfigurableWrapper()\SvnBaseTask::getRuntimeConfigurableWrapper()| Type | Description |
|---|---|
| \RuntimeConfigurable | The wrapper object used by this task |

getTaskName(
)
:
stringReturns the name of task, used only for log messages
Inherited from: \Task::getTaskName()\SvnBaseTask::getTaskName()| Type | Description |
|---|---|
| string | Name of this task |

getTaskType(
)
:
stringReturns the name of the task under which it was invoked, usually the XML tagname
Inherited from: \Task::getTaskType()\SvnBaseTask::getTaskType()| Type | Description |
|---|---|
| string | The type of this task (XML Tag) |

init(
)
:
void
This method includes any necessary SVN libraries and triggers appropriate error if they cannot be found. This is not done in header because we may want this class to be loaded w/o triggering an error.
| Exception | Description |
|---|---|
| \BuildException |

log(
string $msg, integer $level
=
Project::MSG_INFO
)
:
voidProvides a project level log event to the task.
Inherited from: \Task::log()\SvnBaseTask::log()| Name | Type | Description |
|---|---|---|
| $msg | string | The message to log |
| $level | integer | The priority of the message |
- See
- \BuildEvent
- See
- \BuildListener

main(
)
:
voidThe main entry point
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
| Exception | Description |
|---|---|
| \BuildException |

maybeConfigure(
)
:
voidConfigure this task if it hasn't been done already.
Inherited from: \Task::maybeConfigure()\SvnBaseTask::maybeConfigure()
run(
array $args
=
array(), array $switches
=
array()
)
:
string
| Name | Type | Description |
|---|---|---|
| $args | array | Additional arguments to pass to SVN. |
| $switches | array | Switches to pass to SVN. |
| Type | Description |
|---|---|
| string | Output generated by SVN. |

setDescription(
string $desc
)
:
voidSets a textual description of the task
Inherited from: \Task::setDescription()\SvnBaseTask::setDescription()| Name | Type | Description |
|---|---|---|
| $desc | string | The text describing the task |

setForceCompatible(
$force
)
:
voidSets whether to force compatibility with older SVN versions (< 1.2)
| Name | Type | Description |
|---|---|---|
| $force |

setLastChanged(
$lastChanged
)
:
voidSets whether to retrieve the last changed revision
| Name | Type | Description |
|---|---|---|
| $lastChanged |

setLocation(
\Location $location
)
:
voidSets the location within the buildfile this task occurs. Called by the parser to set location information.
Inherited from: \Task::setLocation()\SvnBaseTask::setLocation()| Name | Type | Description |
|---|---|---|
| $location | \Location | The location object describing the position of this task within the buildfile. |

setOwningTarget(
\Target $target
)
:
voidSets the owning target this task belongs to.
Inherited from: \Task::setOwningTarget()\SvnBaseTask::setOwningTarget()| Name | Type | Description |
|---|---|---|
| $target | \Target | Reference to owning target |

setProject(
\Project $project
)
:
voidReferences the project to the current component.
Inherited from: \ProjectComponent::setProject()\Task::setProject()\SvnBaseTask::setProject()| Name | Type | Description |
|---|---|---|
| $project | \Project | The reference to the current project |

setPropertyName(
$propertyName
)
:
voidSets the name of the property to use
| Name | Type | Description |
|---|---|---|
| $propertyName |

setRuntimeConfigurableWrapper(
\RuntimeConfigurable $wrapper
)
:
voidSets the wrapper object this task should use for runtime configurable elements.
Inherited from: \Task::setRuntimeConfigurableWrapper()\SvnBaseTask::setRuntimeConfigurableWrapper()| Name | Type | Description |
|---|---|---|
| $wrapper | \RuntimeConfigurable | The wrapper object this task should use |

setTaskName(
string $name
)
:
stringSets the name of this task for log messages
Inherited from: \Task::setTaskName()\SvnBaseTask::setTaskName()| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| string | A string representing the name of this task for log |

setTaskType(
string $name
)
:
voidSets the type of the task. Usually this is the name of the XML tag
Inherited from: \Task::setTaskType()\SvnBaseTask::setTaskType()| Name | Type | Description |
|---|---|---|
| $name | string | The type of this task (XML Tag) |

setup(
string $mode
)
:
void
| Name | Type | Description |
|---|---|---|
| $mode | string | The SVN mode to use (info, export, checkout, ...) |
| Exception | Description |
|---|---|
| \BuildException |