Class: VersionControl_SVN_Propset
Source Location: /VersionControl_SVN-0.3.2/SVN/Propset.php
VersionControl_SVN
|
--VersionControl_SVN_Propset
Subversion Propset command manager class
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 167]
Subversion Propset command manager class Set PROPNAME to PROPVAL on files, dirs, or revisions. Note: svn recognizes the following special versioned properties but will store any arbitrary properties set: svn:ignore - A newline separated list of file patterns to ignore. svn:keywords - Keywords to be expanded. Valid keywords are: URL, HeadURL - The URL for the head version of the object. Author, LastChangedBy - The last person to modify the file. Date, LastChangedDate - The date/time the object was last modified. Rev, LastChangedRevision - The last revision the object changed. Id - A compressed summary of the previous 4 keywords. svn:executable - If present, make the file executable. This property cannot be set on a directory. A non-recursive attempt will fail, and a recursive attempt will set the property only on the file children of the directory. svn:eol-style - One of 'native', 'LF', 'CR', 'CRLF'. svn:mime-type - The mimetype of the file. Used to determine whether to merge the file, and how to serve it from Apache. A mimetype beginning with 'text/' (or an absent mimetype) is treated as text. Anything else is treated as binary. svn:externals - A newline separated list of module specifiers, each of which consists of a relative directory path, optional revision flags, and an URL. For example foo http://example.com/repos/zig foo/bar -r 1234 http://example.com/repos/zag $switches is an array containing one or more command line options defined by the following associative keys: $switches = array(
'F [file]' => 'Read data from specified file',
// either 'F' or 'file' may be used
'q [quiet]' => true|false,
// print as little as possible
'R' => true|false,
// descend recursively
'recursive' => true|false,
// descend recursively
'revprop' => true|false,
// operate on a revision property (use with r)
'targets' => 'ARG',
// pass contents of file ARG as additional args
'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
'encoding' => 'ARG',
// treat value as being in charset encoding ARG
'force' => true|false,
// force operation to run
'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('username' => 'user', 'password' => 'pass');
$args = array('svn:mime-type', 'image/jpeg', 'foo.jpg');
// Run command
if ($output = $svn->propset ->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:10 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.
|
|