string browseRepo(
string
$repo, [string
$path = '']
)
|
|
Create a directory listing for a given path in a repository
Parameters:
|
string |
$repo: |
|
|
string |
$path: |
|
API Tags:
Information Tags:
| Throws: | Phly_Exception for invalid repository or path |
string execute(
string
$repo, string
$command, [null|string|array
$args = null], [null|string
$path = null]
)
|
|
Execute a darcs command
Executes a darcs command, using the --xml-output switch, and any switches passed in $args. XML output is normalized to include the following:
- XML declaration
- Repository name
- Path on which command was run (if available)
execute() assumes that you have already provided the path to the darcs executable via setExecutable(), as well as the base path to the darcs repositories via setRepoPath(); if either is not true, an exception is raised.Exceptions are also raised if the $repo does not exist, or if the $command is not in $_commands.
If the command selected is 'diff', the switch '-u' is automatically selected, and the actuall diff is wrapped in CDATA between <diff> tags.
Parameters:
|
string |
$repo: |
Repository to use |
|
string |
$command: |
Darcs command to use |
|
null|string|array |
$args: |
Switches to pass to darcs command |
|
null|string |
$path: |
Path being queried within repository |
API Tags:
Information Tags:
Get a list of current repositories
API Tags:
Information Tags:
| Throws: | Phly_Exception when base repo path not set |
Return a list of darcs repositories
API Tags:
boolean setExecutable(
[string
$path = null]
)
|
|
Set the path to the darcs executable
If no argument is passed, or if an invalid argument is passed, and $_darcs is not set, it then attempts to find darcs in the PATH. If it does, it sets $_darcs to that value; otherwise, an exception is thrown.
True is returned when $path is successfully used to set the path; false if setExecutable() has to find darcs in the path or if the new argument is invalid.
Parameters:
API Tags:
Information Tags:
boolean setRepoPath(
string
$path
)
|
|
Set base repository path
This is the path to a directory containing one or more darcs repositories; do not set it to the absolute path of a single repository, but instead to the parent of that path.
Parameters:
API Tags:
Information Tags:
string xmlWrap(
string
$data, [mixed
$repo = null], [string
$path = null]
)
|
|
Wrap XML output with root element
Creates the XML open tag and declaration and the 'darcs' root element. If $repo is provided, it will also create the <path> and children, based on $repo and $path.
Parameters:
|
string |
$data: |
|
|
string |
$path: |
|
API Tags:
string _annotateClean(
string
$xml
)
|
|
Clean up annotation XML
Cleans up annotation XML to fix directory and file name attributes to use full path within repository.
Parameters:
API Tags:
| Static: | |
| Access: | protected |
void _createTree(
DOMElement
$node, [false|string
$name = false]
)
|
|
Recursively fix name attributes of directory and file nodes
Parameters:
|
DOMElement |
$node: |
|
|
false|string |
$name: |
|
API Tags:
| Static: | |
| Access: | protected |