Query: svn_commit
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SVN_COMMIT(3) 1 SVN_COMMIT(3) svn_commit - Sends changes from the local working copy to the repositorySYNOPSISarray svn_commit (string $log, array $targets, [bool $recursive = true])DESCRIPTIONCommits 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)PARAMETERSo $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 VALUESReturns 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.NOTESWarning 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.EXAMPLESExample #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 ALSOsvn_auth_set_parameter(3), SVN documentation on svn commit. PHP Documentation Group SVN_COMMIT(3)
Related Man Pages |
---|
svn_status(3) - php |
parsekit_func_arginfo(3) - php |
stomp_commit(3) - php |
svn_diff(3) - php |
svn_log(3) - php |