[line 141]
Subversion Mkdir command manager class
Create a new directory under version control.
From svn mkdir --help:
usage: 1. mkdir PATH... 2. mkdir URL...
Create version controlled directories.
- Each directory specified by a working copy PATH is created locally
and scheduled for addition upon the next commit.
2. Each directory specified by a URL is created in the repository via an immediate commit.
In both cases, all the intermediate directories must already exist.
New directories must include a message option (either with 'm', 'message', 'file' or 'F' keys), when the directory is created directly in the repository, as that results in an immediate commit.
$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
'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'
);
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';
// 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' => 'Let\'s make a hole here ...', 'username' => 'user', 'password' => 'pass');
$args = array('svn://svn.example.com/repos/TestProj/trunk/newdir');
// Run command
try {
}
?>