Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

svn_ls(3) [php man page]

SVN_LS(3)								 1								 SVN_LS(3)

svn_ls - Returns list of directory contents in repository URL, optionally at revision number

SYNOPSIS
array svn_ls (string $repos_url, [int $revision_no = SVN_REVISION_HEAD], [bool $recurse = false], [bool $peg = false]) DESCRIPTION
This function queries the repository URL and returns a list of files and directories, optionally from a specific revision. This is equiva- lent to svn list $repos_url[@$revision_no] Note This function does not work with working copies. $repos_url must be a repository URL. PARAMETERS
o $url - URL of the repository, eg. http://www.example.com/svnroot. To access a local Subversion repository via filesystem, use the file URI scheme, eg. file:///home/user/svn-repos o $revision - Integer revision number to retrieve listing of. When omitted, the HEAD revision is used. o $recurse - Enables recursion. RETURN VALUES
On success, this function returns an array file listing in the format of: [0] => Array ( [created_rev] => integer revision number of last edit [last_author] => string author name of last edit [size] => integer byte file size of file [time] => string date of last edit in form 'M d H:i' or 'M d Y', depending on how old the file is [time_t] => integer unix timestamp of last edit [name] => name of file/directory [type] => type, can be 'file' or 'dir' ) [1] => ... NOTES
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. EXAMPLES
Example #1 svn_ls(3) example <?php print_r( svn_ls('http://www.example.com/svnroot/') ); ?> The above example will output something similar to: Array ( [0] => Array ( [created_rev] => 20 [last_author] => Joe [size] => 0 [time] => Apr 02 09:28 [time_t] => 1175520529 [name] => tags [type] => dir ) [1] => Array ( [created_rev] => 23 [last_author] => Bob [size] => 0 [time] => Apr 02 15:15 [time_t] => 1175541322 [name] => trunk [type] => dir ) ) SEE ALSO
SVN documentation on svn list. PHP Documentation Group SVN_LS(3)

Check Out this Related Man Page

SVN_COMMIT(3)								 1							     SVN_COMMIT(3)

svn_commit - Sends changes from the local working copy to the repository

SYNOPSIS
array svn_commit (string $log, array $targets, [bool $recursive = true]) DESCRIPTION
Commits changes made in the local working copy files enumerated in the $targets array to the repository, with the log message $log. Direc- tories in the $targets array will be recursively committed unless $recursive is set to FALSE. Note This function does not have any parameters for specifying authentication, so a username and password must be set using svn_auth_set_parameter(3) PARAMETERS
o $log - String log text to commit o $targets - Array of local paths of files to be committed Warning This parameter must be an array, a string for a single target is not acceptable. Note Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script's working directory, use realpath(3) or dirname(__FILE__). o $recursive - Boolean flag to disable recursive committing of directories in the $targets array. Default is TRUE. RETURN VALUES
Returns array in form of: array( 0 => integer revision number of commit 1 => string ISO 8601 date and time of commit 2 => name of committer ) Returns FALSE on failure. NOTES
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. EXAMPLES
Example #1 Basic example This example commits the calculator directory to a repository, using the username Bob and the password abc123 (hopefully, his pass- word is stronger): <?php svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, 'Bob'); svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, 'abc123'); var_dump(svn_commit('Log message of Bob's commit', array(realpath('calculator')))); ?> The above example will output: array( 0 => 1415, 1 => '2007-05-26T01:44:28.453125Z', 2 => 'Bob' ) SEE ALSO
svn_auth_set_parameter(3), SVN documentation on svn commit. PHP Documentation Group SVN_COMMIT(3)
Man Page