Class: VersionControl_SVN_Commit
Source Location: /VersionControl_SVN-0.3.2/SVN/Commit.php
VersionControl_SVN
|
--VersionControl_SVN_Commit
Subversion Commit command manager class
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 141]
Subversion Commit command manager class Send changes from a working copy to the repository. Commits must include a commit message option (either with 'm', 'message', 'file' or 'F' keys), but the message itself may be blank. $switches is an array containing one or more command line options defined by the following associative keys: $switches = array(
'm [message]' => 'Specified commit message',
// either 'm' or 'message' may be used
'F [file]' => 'Read commit message data from specified file',
// either 'F' or 'file' may be used
'q [quiet]' => true|false,
// prints as little as possible
'N' => true|false,
// operate on single directory only
'non-recursive' => true|false,
// operate on single directory only
'targets' => 'ARG',
// pass contents of file ARG as additional args
'force-log' => true|false,
// force validity of log message source
'username' => 'Subversion repository login',
'password' => 'Subversion repository password',
'no-auth-cache' => true|false,
// Do not cache authentication tokens
'encoding' => 'ARG',
// treat value as being in charset encoding ARG
'config-dir' => 'Path to a Subversion configuration directory'
);
If a path is not used in the $args array, the default path of '.' will be assumed. Note: Subversion does not offer an XML output option for this subcommand The non-interactive option available on the command-line svn client may also be set (true|false), but it is set to true by default. The editor-cmd option available on the command-line svn client is not available since this class does not operate as an interactive shell session. Usage example: <?php
require_once 'VersionControl/SVN.php';
// Setup error handling -- always a good idea!
$svnstack = &PEAR_ErrorStack::singleton('VersionControl_SVN');
// Set up runtime options. Will be passed to all
// subclasses.
// Pass array of subcommands we need to factory
// Define any switches and aguments we may need
$switches = array('m' => 'Bug #1234 fixed!', 'username' => 'user', 'password' => 'pass');
$args = array('/path/to/working_copy');
// Run command
if ($output = $svn->commit ->run($args, $switches)) {
} else {
if (count($errs = $svnstack->getErrors ())) {
foreach ($errs as $err) {
echo '<br />'.$err['message']."<br />\n";
echo "Command used: " . $err['params']['cmd'];
}
}
}
?>
Class Variables
Method Detail
Documentation generated on Sun, 09 Aug 2009 21:30:05 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|
|