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

Class: VersionControl_SVN_Command_Log

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

Class Overview

VersionControl_SVN_Command
   |
   --VersionControl_SVN_Command_Log

Subversion Log command manager class


Author(s):

Version:

  • 0.5.2

Copyright:

  • 2004-2007 Clay Loveless

Variables

Methods


Inherited Variables

Inherited Methods

Class: VersionControl_SVN_Command

VersionControl_SVN_Command::__construct()
Constructor. Can't be called directly as class is abstract.
VersionControl_SVN_Command::checkCommandRequirements()
Standardized validation of requirements for a command class.
VersionControl_SVN_Command::fillSwitch()
Fills the switches array on given name with value if not already set and value is not null.
VersionControl_SVN_Command::parseOutput()
Handles output parsing of standard and verbose output of command.
VersionControl_SVN_Command::postProcessSwitches()
Called after handling switches.
VersionControl_SVN_Command::prepare()
Prepare the command switches.
VersionControl_SVN_Command::preProcessSwitches()
Called before handling switches.
VersionControl_SVN_Command::run()
Run the command with the defined switches.
VersionControl_SVN_Command::setOptions()
Allow for overriding of previously declared options.

Class Details

[line 129]
Subversion Log command manager class

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

  1.  $switches = array(
  2.   'username'      =>  'Subversion repository login',
  3.   'password'      =>  'Subversion repository password',
  4.   'config-dir'    =>  'Path to a Subversion configuration directory',
  5.                       // [DEFAULT: null]
  6.   'r [revision]'  =>  'ARG (some commands also take ARG1:ARG2 range)
  7.                         A revision argument can be one of:
  8.                            NUMBER       revision number
  9.                            "{" DATE "}" revision at start of the date
  10.                            "HEAD"       latest in repository
  11.                            "BASE"       base rev of item's working copy
  12.                            "COMMITTED"  last commit at or before BASE
  13.                            "PREV"       revision just before COMMITTED',
  14.                       // either 'r' or 'revision' may be used
  15.   '[quiet]'     =>  true|false,
  16.                      // prints as little as possible
  17.   '[verbose]'   =>  true|false,
  18.                       // prints extra information
  19.   'targets'       =>  'ARG',
  20.                       // passes contents of file ARG as additional arguments
  21.   'stop-on-copy'  =>  true|false,
  22.                       // do not cross copies while traversing history
  23.   'incremental'   =>  true|false,
  24.                       // gives output suitable for concatenation
  25.   'xml'           =>  true|false,
  26.                       // output in XML. Auto-set by fetchmodes VERSIONCONTROL_SVN_FETCHMODE_ASSOC,
  27.                       // VERSIONCONTROL_SVN_FETCHMODE_XML and VERSIONCONTROL_SVN_FETCHMODE_OBJECT
  28.   'no-auth-cache' =>  true|false
  29.                       // Do not cache authentication tokens
  30.  
  31.  );

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';
  3.  
  4.  // Set up runtime options. Will be passed to all
  5.  // subclasses.
  6.  $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ASSOC);
  7.  
  8.  // Pass array of subcommands we need to factory
  9.  $svn VersionControl_SVN::factory(array('log')$options);
  10.  
  11.  // Define any switches and aguments we may need
  12.  $switches = array('verbose' => true);
  13.  $args = array('svn://svn.example.com/repos/TestProject');
  14.  
  15.  // Run command
  16.  try {
  17.      print_r($svn->log->run($args$switches));
  18.  catch (VersionControl_SVN_Exception $e{
  19.      print_r($e->getMessage());
  20.  }
  21.  ?>



[ Top ]


Class Variables

$xmlAvail =  true

[line 136]

Keep track of whether XML output is available for a command
  • Access: protected

Type:   boolean
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 141]

VersionControl_SVN_Command_Log __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, 29 Sep 2014 09:00:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.