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

Class: VersionControl_SVN_Command_Update

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

Class Overview

VersionControl_SVN_Command
   |
   --VersionControl_SVN_Command_Update

Subversion Update command manager class


Author(s):

Version:

  • 0.5.2

Copyright:

  • 2004-2007 Clay Loveless

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 147]
Subversion Update command manager class

Bring changes from the repository into the working copy.

From 'svn update --help':

usage: update [PATH...]

If no revision given, bring working copy up-to-date with HEAD rev. Else synchronize working copy to revision given by -r.

For each updated item a line will start with a character reporting the action taken. These characters have the following meaning:

A Added D Deleted U Updated C Conflict G Merged

A character in the first column signifies an update to the actual file, while updates to the file's properties are shown in the second column.

Conversion of the above usage example to VersionControl_SVN_Switch:

  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_RAW);
  7.  
  8.  $switches = array('r' => '30');
  9.  $args = array('/path/to/working/copy');
  10.  
  11.  $svn VersionControl_SVN::factory(array('update')$options);
  12.  try {
  13.      print_r($svn->update->run($args$switches));
  14.  catch (VersionControl_SVN_Exception $e{
  15.      print_r($e->getMessage());
  16.  }
  17.  ?>

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

  1.  $switches = array(
  2.   'r [revision]'  =>  'ARG (some commands also take ARG1:ARG2 range)
  3.                         A revision argument can be one of:
  4.                            NUMBER       revision number
  5.                            "{" DATE "}" revision at start of the date
  6.                            "HEAD"       latest in repository
  7.                            "BASE"       base rev of item's working copy
  8.                            "COMMITTED"  last commit at or before BASE
  9.                            "PREV"       revision just before COMMITTED',
  10.                       // either 'r' or 'revision' may be used
  11.   'N'             =>  true|false,
  12.                       // operate on single directory only
  13.   'non-recursive' =>  true|false,
  14.                       // operate on single directory only
  15.   '[quiet]'     =>  true|false,
  16.                       // print as little as possible
  17.   'diff3-cmd'     =>  'ARG',
  18.                       // use ARG as merge command
  19.   'parents'       =>  true|false,
  20.                       // make intermediate directories
  21.   'username'      =>  'Subversion repository login',
  22.   'password'      =>  'Subversion repository password',
  23.   'no-auth-cache' =>  true|false,
  24.                       // Do not cache authentication tokens
  25.   'config-dir'    =>  'Path to a Subversion configuration directory'
  26.  );

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.



[ Top ]


Method Detail

__construct (Constructor)   [line 152]

VersionControl_SVN_Command_Update __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:08 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.