Class: VersionControl_SVN_Switch
Source Location: /VersionControl_SVN-0.3.2/SVN/Switch.php
VersionControl_SVN
|
--VersionControl_SVN_Switch
Subversion Switch command manager class
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 150]
Subversion Switch command manager class Update the working copy to a different URL. From 'svn switch --help': usage: 1. switch URL [PATH] 2. switch --relocate FROM TO [PATH...] - Update the working copy to mirror a new URL within the repository.
This behaviour is similar to 'svn update', and is the way to
move a working copy to a branch or tag within the same repository.
2. Rewrite working copy URL metadata to reflect a syntactic change only. This is used when repository's root URL changes (such as a schema or hostname change) but your working copy still reflects the same directory within the same repository. Conversion of the above usage example to VersionControl_SVN_Switch: <?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.
$switches = array('relocate' => 'true');
$args = array(
'svn://svn.example.com/repos/TestProj/trunk',
'svn://svn.example.com/repos/TestProj_Fork/trunk',
'/path/to/working/copy'
);
if (count($errs = $svnstack->getErrors ())) {
foreach ($errs as $err) {
echo '<br />'.$err['message']."<br />\n";
echo "Command used: " . $err['params']['cmd'];
}
}
?>
$switches is an array containing one or more command line options defined by the following associative keys: $switches = array(
'r [revision]' => 'ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
NUMBER revision number
"{" DATE "}" revision at start of the date
"HEAD" latest in repository
"BASE" base rev of item's working copy
"COMMITTED" last commit at or before BASE
"PREV" revision just before COMMITTED',
// either 'r' or 'revision' may be used
'N' => true|false,
// operate on single directory only
'non-recursive' => true|false,
// operate on single directory only
'q [quiet]' => true|false,
// print as little as possible
'diff3-cmd' => 'ARG',
// use ARG as merge command
'relocate' => true|false,
// relocate via URL-rewriting
'username' => 'Subversion repository login',
'password' => 'Subversion repository password',
'no-auth-cache' => true|false,
// Do not cache authentication tokens
'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.
Class Variables
Method Detail
Documentation generated on Sun, 09 Aug 2009 21:30:12 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|
|