Class: VersionControl_SVN_Propget
Source Location: /VersionControl_SVN-0.3.2/SVN/Propget.php
VersionControl_SVN
|
--VersionControl_SVN_Propget
Subversion Propget command manager class
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 140]
Subversion Propget command manager class Print the value of PROPNAME on files, dirs, or revisions. By default, this subcommand will add an extra newline to the end of the property values so that the output looks pretty. Also, whenever there are multiple paths involved, each property value is prefixed with the path with which it is associated. Use the 'strict' switch to disable these beautifications (useful, for example, when redirecting binary property values to a file). $switches is an array containing one or more command line options defined by the following associative keys: $switches = array(
'strict' => true|false,
// use strict semantics
'R' => true|false,
// descend recursively
'recursive' => true|false,
// descend recursively
'revprop' => true|false,
// operate on a revision property (use with r)
'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
'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. 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('strict' => true, 'username' => 'user', 'password' => 'pass');
$args = array('svn:keywords', 'svn://svn.example.com/repos/TestProj/trunk');
// Run command
if ($output = $svn->propget ->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:09 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|
|