sTEFANs Subversion Web Contol (SWC)
Inc
[ class tree: Swc ] [ index: Swc ] [ all elements ]

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.

Since:  v1.0.0
Filesource:  Source Code for this file
Version:  v1.1.0
License:  GNU Lesser General Public License
Copyright:  Copyright ©2006 by sTEFANs
Author:  Stefan Schraml
Includes
require_once ('config.inc.php') [line 39]

Project configuration interface

Project configuration interface

[ Top ]

require_once ('var.inc.php') [line 37]

Common defines

Common defines

[ Top ]


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

[ Top ]
CheckoutWebspace  [line 448]

array CheckoutWebspace( SwcConfig $config  )

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:
Return:  Result of svn checkout execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0

[ Top ]
CleanupWebspace  [line 470]

array &CleanupWebspace( SwcConfig $config  )

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:
Return:  Result of svn cleanup execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0

[ Top ]
ExecSvnCmd  [line 549]

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:
Since:  v1.0.0

[ Top ]
GetBranches  [line 340]

array &GetBranches( SwcConfig $config  )

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:
Since:  v1.0.0

[ Top ]
GetHeadDate  [line 168]

string GetHeadDate( SwcConfig $config  )

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:
Since:  v1.0.0

[ Top ]
GetHeadRevision  [line 154]

int GetHeadRevision( SwcConfig $config  )

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:
Since:  v1.0.0

[ Top ]
GetLineArray  [line 603]

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:
Since:  v1.0.0

[ Top ]
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:
Return:  Output line by line.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.1.0

[ Top ]
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:
Since:  v1.0.0

[ Top ]
GetSvnAdminHelp  [line 82]

array GetSvnAdminHelp( )

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:
Since:  v1.0.0

[ Top ]
GetSvnHelp  [line 50]

array GetSvnHelp( )

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:
Since:  v1.0.0

[ Top ]
GetSvnLookHelp  [line 66]

array GetSvnLookHelp( )

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:
Since:  v1.0.0

[ Top ]
GetSvnPw  [line 529]

string GetSvnPw( SwcConfig $config  )

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:
Since:  v1.0.0

[ Top ]
GetSvnUsr  [line 512]

string GetSvnUsr( SwcConfig $config  )

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:
Since:  v1.0.0

[ Top ]
GetSvnVersion  [line 111]

string GetSvnVersion( )

Returns the version of SVN.

Returns the version of SVN.


API Tags:
Return:  Version of Subversion

Information Tags:
Since:  v1.0.0

[ Top ]
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:
Since:  v1.0.0

[ Top ]
GetTags  [line 325]

array &GetTags( SwcConfig $config  )

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:
Return:  Version tags.

Information Tags:
Since:  v1.0.0

[ Top ]
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:
Return:  Output line by line.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0
Version:  v1.1.0

[ Top ]
GetWebspaceLog  [line 287]

array &GetWebspaceLog( SwcConfig $config  )

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:
Return:  Result of svn log execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0

[ Top ]
GetWebspaceRevision  [line 213]

int GetWebspaceRevision( SwcConfig $config  )

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:
Since:  v1.0.0

[ Top ]
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:
Since:  v1.0.0

[ Top ]
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:
Since:  v1.0.0

[ Top ]
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:
Return:  Result of svn status execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0

[ Top ]
ListRepository  [line 307]

array ListRepository( SwcConfig $config  )

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:
Return:  Result of svn list execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.1.0

[ Top ]
ParseArray  [line 627]

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:
Since:  v1.0.0

[ Top ]
PrintArray  [line 655]

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

[ Top ]
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:
Return:  Result of svn switch execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0

[ Top ]
UpdateWebspace  [line 423]

array UpdateWebspace( SwcConfig $config  )

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:
Return:  Result of svn update execution.
See:  ExecSvnCmd()

Information Tags:
Since:  v1.0.0

[ Top ]


Documentation generated on Fri, 03 Nov 2006 18:45:00 +0100 by phpDocumentor 1.3.0RC6
for sTEFANs POWERED BY eBC.bz