tasks/ext/git/GitBranchTask.php
Wrapper aroung git-branch
- Author
- Victor Farazdagi
- Package
- phing.tasks.ext.git
- See
- \VersionControl_Git
- Since
- 2.4.3
- Version
- $Id: 88a8737d783614bcd5acb103738fafc23c509225 $
\GitBranchTask
Wrapper aroung git-branch
Use {@link Project#createTask} to register a new Task.
- Parent(s)
- \GitBaseTask < \Task < \ProjectComponent
- See
- \VersionControl_Git
- Author
- Victor Farazdagi
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Since
- 2.4.3
- Version
- $Id: 88a8737d783614bcd5acb103738fafc23c509225 $
Properties

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

array
$extraOptions= 'array(
'd' => false,
'D' => false,
'm' => false,
'M' => false,
)'
-d, -D, -m, -M options to git-branch Respective task options: delete, forceDelete, move, forceMove
array(
'd' => false,
'D' => false,
'm' => false,
'M' => false,
)Details- Type
- array

\VersionControl_Git
$gitClient= 'null'
nullDetails- Type
- \VersionControl_Git
- Inherited_from
- \GitBaseTask::$$gitClient

string
$gitPath= ''/usr/bin/git''
'/usr/bin/git'Details- Type
- string
- Inherited_from
- \GitBaseTask::$$gitPath

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

\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\GitBaseTask::$$projectnullDetails- Type
- \Project
- Inherited_from
- \ProjectComponent::$$project
- Inherited_from
- \Task::$$project
- Inherited_from
- \GitBaseTask::$$project

boolean
$setUpstream= 'false'
--set-upstream key to git-branch
falseDetails- Type
- boolean

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

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

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

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

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

getGitClient(
$reset
=
false, $repository
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $reset | ||
| $repository |

getLocation(
)
:
\LocationReturns the location within the buildfile this task occurs. Used by {@link BuildException} to give detailed error messages.
Inherited from: \Task::getLocation()\GitBaseTask::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()\GitBaseTask::getOwningTarget()| Type | Description |
|---|---|
| \Target | The target object that owns this task |

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

getRuntimeConfigurableWrapper(
)
:
\RuntimeConfigurableReturns the wrapper object for runtime configuration
Inherited from: \Task::getRuntimeConfigurableWrapper()\GitBaseTask::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()\GitBaseTask::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()\GitBaseTask::getTaskType()| Type | Description |
|---|---|
| string | The type of this task (XML Tag) |

log(
string $msg, integer $level
=
Project::MSG_INFO
)
:
voidProvides a project level log event to the task.
Inherited from: \Task::log()\GitBaseTask::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 for the task
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.

maybeConfigure(
)
:
voidConfigure this task if it hasn't been done already.
Inherited from: \Task::maybeConfigure()\GitBaseTask::maybeConfigure()
setDescription(
string $desc
)
:
voidSets a textual description of the task
Inherited from: \Task::setDescription()\GitBaseTask::setDescription()| Name | Type | Description |
|---|---|---|
| $desc | string | The text describing the task |

setGitPath(
string $gitPath
)
:
\GitBaseTask
| Name | Type | Description |
|---|---|---|
| $gitPath | string | New path to git repository |
| Type | Description |
|---|---|
| \GitBaseTask |

setLocation(
\Location $location
)
:
voidSets the location within the buildfile this task occurs. Called by the parser to set location information.
Inherited from: \Task::setLocation()\GitBaseTask::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()\GitBaseTask::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()\GitBaseTask::setProject()| Name | Type | Description |
|---|---|---|
| $project | \Project | The reference to the current project |

setRepository(
string $repository
)
:
\GitBaseTask
| Name | Type | Description |
|---|---|---|
| $repository | string | Repo directory |
| Type | Description |
|---|---|
| \GitBaseTask |

setRuntimeConfigurableWrapper(
\RuntimeConfigurable $wrapper
)
:
voidSets the wrapper object this task should use for runtime configurable elements.
Inherited from: \Task::setRuntimeConfigurableWrapper()\GitBaseTask::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()\GitBaseTask::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()\GitBaseTask::setTaskType()| Name | Type | Description |
|---|---|---|
| $name | string | The type of this task (XML Tag) |