Procedural File: svn_lib.inc.php
Source Location: /swc/inc/svn_lib.inc.php
Page Details
A collection of functions that encapsulates SVN commands.
A collection of functions that encapsulates SVN commands.
Includes
Project configuration interface
Project configuration interface
Common defines
Common defines
Functions
BuildSvnDirTree [line 389]
array &BuildSvnDirTree(
&$paths, &$tree, int $max_level, [string $parent_dir = ''], array $paths, array $tree
)
|
|
Builds SVN directory tree.
Builds SVN directory tree.
Parameters:
array |
$paths: |
Reference to SVN path array |
array |
$tree: |
Reference to 'svnlook tree' stdout that should be transformed into SVN paths. |
int |
$max_level: |
Mamimum level for paths. |
string |
$parent_dir: |
Parent directory in path. |
|
&$paths: |
|
|
&$tree: |
|
API Tags:
Return: | Paths already found. |
Information Tags:
Since: | v1.0.0 |
Version: | v1.1.0 |
CheckoutWebspace [line 448]
Performs workspace (webspace) checkout and returns the output of 'svn checkout' contained in a result array as produced by ExecSvnCmd.
Performs workspace (webspace) checkout and returns the output of 'svn checkout' contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
CleanupWebspace [line 470]
Performs webspace cleanup and returns the output of svn cleanup contained in a result array as produced by ExecSvnCmd.
Performs webspace cleanup and returns the output of svn cleanup contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
array &ExecSvnCmd(
string $cmd, [string $arg = ''], [ $switches = ''], string $switch
)
|
|
Executes an SVN command.
Executes an SVN command.
Parameters:
string |
$cmd: |
Command to execute |
string |
$switch: |
Switches to be applied for the given command |
string |
$arg: |
Arguments of the command |
|
$switches: |
|
API Tags:
Return: | Result array containing commandline (idx = IDX_CMDLINE), standard out array (idx = IDX_STDOUT), error array (idx = IDX_ERROUT), and return code of the command (idx = IDX_CMD_RC). |
Information Tags:
Returns the array of branches available in the repository.
Returns the array of branches available in the repository.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Return: | Version branches. |
Information Tags:
Returns the formated date of the latest changes within the repository.
Returns the formated date of the latest changes within the repository.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Return: | Date of HEAD revision. |
Information Tags:
GetHeadRevision [line 154]
Returns the number of the youngest SVN revision (HEAD) available in the repository.
Returns the number of the youngest SVN revision (HEAD) available in the repository.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Return: | Number of HEAD revision |
Information Tags:
array &GetLineArray(
resource $handle, [int $length = 4096]
)
|
|
Reads data from a resource (e. returns an array that contains each line for a separate index.
Reads data from a resource (e.g. pipe) and returns an array that contains each line for a separate index.
Parameters:
resource |
$handle: |
Resource handle |
int |
$length: |
Maximum line length used if a line is not delimited. |
API Tags:
Return: | Array containing a delimited line per index. |
Information Tags:
GetRepositoryInfo [line 135]
array &GetRepositoryInfo(
SwcConfig $config
)
|
|
Returns the output of svn info for the repository contained in a result array as produced by ExecSvnCmd.
Returns the output of svn info for the repository contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
GetRepositoryPaths [line 357]
array GetRepositoryPaths(
SwcConfig $config, mixed $roots, int $depth
)
|
|
Returns an array of repository paths starting at $root with maximum directory count given in $level.
Returns an array of repository paths starting at $root with maximum directory count given in $level.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
int |
$depth: |
Maximum directory depth. |
API Tags:
Return: | Array of paths of repository. |
Information Tags:
GetSvnAdminHelp [line 82]
Returns the help output of svnadmin.
Returns the help output of svnadmin.
API Tags:
Return: | svnadmin help output in form of a result array as produced by ExecSvnCmd. |
See: | ExecSvnCmd() |
Information Tags:
Returns the help output of svn.
Returns the help output of svn.
API Tags:
Return: | svn help output in form of a result array as produced by ExecSvnCmd. |
See: | ExecSvnCmd() |
Information Tags:
Returns the help output of svnlook.
Returns the help output of svnlook.
API Tags:
Return: | svnlook help output in form of a result array as produced by ExecSvnCmd. |
See: | ExecSvnCmd() |
Information Tags:
Returns the SVN password switch for the given config.
Returns the SVN password switch for the given config.
Parameters:
SwcConfig |
$config: |
Config for retrieving user. |
API Tags:
Return: | svn switch for password (empty string if no password is applied. |
Information Tags:
Returns the SVN User switch for the given config.
Returns the SVN User switch for the given config.
Parameters:
SwcConfig |
$config: |
Config for retrieving user. |
API Tags:
Return: | svn switch for user (empty string if no user is applied. |
Information Tags:
Returns the version of SVN.
Returns the version of SVN.
API Tags:
Return: | Version of Subversion |
Information Tags:
GetSvnVersionHelp [line 98]
array GetSvnVersionHelp(
)
|
|
Returns the help output of svnversion.
Returns the help output of svnversion.
API Tags:
Return: | svnversion help output in form of a result array as produced by ExecSvnCmd. |
See: | ExecSvnCmd() |
Information Tags:
Returns the array of tags available in the repository.
Returns the array of tags available in the repository.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
GetWebspaceInfo [line 189]
array &GetWebspaceInfo(
SwcConfig $config, [boolean $xml_output = true]
)
|
|
Returns the output of svn info contained in a result array as produced by ExecSvnCmd.
Returns the output of svn info contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
boolean |
$xml_output: |
Whether or not output shall be printed in xml format (default). |
API Tags:
Information Tags:
Since: | v1.0.0 |
Version: | v1.1.0 |
GetWebspaceLog [line 287]
Returns the output of svn log contained in a result array as produced by ExecSvnCmd.
Returns the output of svn log contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
GetWebspaceRevision [line 213]
Returns the number of the SVN revision of the webspace.
Returns the number of the SVN revision of the webspace.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Return: | Webspace revision. |
Information Tags:
GetWebspaceRevisionDate [line 243]
string GetWebspaceRevisionDate(
SwcConfig $config
)
|
|
Returns the formated date of the revision of the workspace.
Returns the formated date of the revision of the workspace.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Return: | Date of webspace revision. |
Information Tags:
GetWebspaceSourcePath [line 227]
string GetWebspaceSourcePath(
SwcConfig $config
)
|
|
Returns the path of the repository where the webspace referes to with repository root directory.
Returns the path of the repository where the webspace referes to with repository root directory.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Return: | Repository path the webspace points to. |
Information Tags:
GetWebspaceStatus [line 260]
array &GetWebspaceStatus(
SwcConfig $config
)
|
|
Returns the output of svn status contained in a result array as produced by ExecSvnCmd.
Returns the output of svn status contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
ListRepository [line 307]
Returns the output of svn list contained in a result array as produced by ExecSvnCmd.
Returns the output of svn list contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
string ParseArray(
&$array, string $startstr, [string $endstr = NULL], array $array
)
|
|
Returns a string of the given array that is encapsulated within $startstr and $endstr.
Returns a string of the given array that is encapsulated within $startstr and $endstr.
Parameters:
array |
$array: |
Line array as provided by 'GetLineArray' to search the string within. |
string |
$startstr: |
String to search. |
string |
$endstr: |
String to delimit search. If NULL, the returned string is not delimited. |
|
&$array: |
|
API Tags:
Return: | String within a 'line' of $array that starts with '$startstr' and ends with '$endstr'. If $startstr is not found, '?' is returned. $startstr is not returned. |
Information Tags:
void PrintArray(
array $array, [string $name = ''], [boolean $encode_html_chars = true]
)
|
|
HTML and user friendly output of an array.
HTML and user friendly output of an array.
Parameters:
array |
$array: |
Array to print |
string |
$name: |
Name of the array, also printed. |
boolean |
$encode_html_chars: |
Whether or not to encode special characters to HTML equivalents (default). |
Information Tags:
Since: | v1.0.0 |
Version: | v.1.1.0 |
SwitchWebspace [line 490]
array SwitchWebspace(
SwcConfig $config, string $path
)
|
|
Switches webspace to given repository path.
Switches webspace to given repository path.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
string |
$path: |
Repository path to switch to A path without repository root should be applied. |
API Tags:
Information Tags:
UpdateWebspace [line 423]
Performs webspace update to head revision and returns the output of 'svn update' contained in a result array as produced by ExecSvnCmd.
Performs webspace update to head revision and returns the output of 'svn update' contained in a result array as produced by ExecSvnCmd.
Parameters:
SwcConfig |
$config: |
SWC config for the operation. |
API Tags:
Information Tags:
|
|