[ class tree: VersionControl_SVN ] [ index: VersionControl_SVN ] [ all elements ]

Class: VersionControl_SVN_Command_Propset

Source Location: /VersionControl_SVN-0.5.2/VersionControl/SVN/Command/Propset.php

Class Overview


Subversion Propset command manager class



  • 0.5.2


  • 2004-2007 Clay Loveless



Inherited Variables

Inherited Methods

Class: VersionControl_SVN_Command

Constructor. Can't be called directly as class is abstract.
Standardized validation of requirements for a command class.
Fills the switches array on given name with value if not already set and value is not null.
Handles output parsing of standard and verbose output of command.
Called after handling switches.
Prepare the command switches.
Called before handling switches.
Run the command with the defined switches.
Allow for overriding of previously declared options.

Class Details

[line 160]
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 foo/bar -r 1234

$switches is an array containing one or more command line options defined by the following associative keys:

  1.  $switches = array(
  2.   'F [file]'      =>  'Read data from specified file',
  3.                       // either 'F' or 'file' may be used
  4.   'q [quiet]'     =>  true|false,
  5.                       // print as little as possible
  6.   'R'             =>  true|false,
  7.                       // descend recursively
  8.   'recursive'     =>  true|false,
  9.                       // descend recursively
  10.   'revprop'       =>  true|false,
  11.                       // operate on a revision property (use with r)
  12.   'targets'       =>  'ARG',
  13.                       // pass contents of file ARG as additional args
  14.   'r [revision]'  =>  'ARG (some commands also take ARG1:ARG2 range)
  15.                         A revision argument can be one of:
  16.                            NUMBER       revision number
  17.                            "{" DATE "}" revision at start of the date
  18.                            "HEAD"       latest in repository
  19.                            "BASE"       base rev of item's working copy
  20.                            "COMMITTED"  last commit at or before BASE
  21.                            "PREV"       revision just before COMMITTED',
  22.                       // either 'r' or 'revision' may be used
  23.   'username'      =>  'Subversion repository login',
  24.   'password'      =>  'Subversion repository password',
  25.   'no-auth-cache' =>  true|false,
  26.                       // Do not cache authentication tokens
  27.   'encoding'      =>  'ARG',
  28.                       // treat value as being in charset encoding ARG
  29.   'force'         =>  true|false,
  30.                       // force operation to run
  31.   'config-dir'    =>  'Path to a Subversion configuration directory'
  32.  );

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:

  1.  <?php
  2.  require_once 'VersionControl/SVN.php';
  4.  // Set up runtime options. Will be passed to all
  5.  // subclasses.
  6.  $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW);
  8.  // Pass array of subcommands we need to factory
  9.  $svn VersionControl_SVN::factory(array('propset')$options);
  11.  // Define any switches and aguments we may need
  12.  $switches = array('username' => 'user''password' => 'pass');
  13.  $args = array('svn:mime-type''image/jpeg''foo.jpg');
  15.  // Run command
  16.  try {
  17.      print_r($svn->propset->run($args$switches));
  18.  catch (VersionControl_SVN_Exception $e{
  19.      print_r($e->getMessage());
  20.  }
  21.  ?>

[ Top ]

Class Variables

$minArgs =  3

[line 169]

Minimum number of args required by this subcommand.

See Version Control with Subversion, Subversion Complete Reference for details on arguments for this subcommand.

  • Access: protected

Type:   int
Overrides:   Array

[ Top ]

Method Detail

__construct (Constructor)   [line 174]

VersionControl_SVN_Command_Propset __construct( )

Constuctor of command. Adds available switches.
  • Access: public

Overrides VersionControl_SVN_Command::__construct() (Constructor. Can't be called directly as class is abstract.)
[ Top ]

Documentation generated on Mon, 11 Mar 2019 15:58:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.