Class: VersionControl_SVN_Import
Source Location: /VersionControl_SVN-0.3.2/SVN/Import.php
VersionControl_SVN
|
--VersionControl_SVN_Import
Subversion Import command manager class
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 147]
Subversion Import command manager class Recursively commit an unversioned file or tree into the repository Commits must include a commit message option (either with 'm', 'message', 'file' or 'F' keys), but the message itself may be blank. If the 'path' argument is omitted, '.' is assumed. Parent directories are created as necessary in the repository. $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
'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
'auto-props' => true|false,
// enable automatic properties. Setting to false IS NOT the same
// as setting no-auto-props to true.
'no-auto-props' => true|false,
// disable automatic properties. Setting to false IS NOT the same
// as setting auto-props to true.
'config-dir' => 'Path to a Subversion configuration directory'
);
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' => 'Initial Import - and awwwaaay we go!',
'username' => 'user', 'password' => 'pass');
$args = array('/path/to/working_copy',
'svn://svn.example.com/repos/NewProject/');
// Run command
if ($output = $svn->import ->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:07 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|
|