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

Class: VersionControl_SVN_Cleanup

Source Location: /VersionControl_SVN-0.3.1/SVN/Cleanup.php

Class Overview

VersionControl_SVN
   |
   --VersionControl_SVN_Cleanup

Subversion Cleanup command manager class


Author(s):

Version:

  • 0.3.1

Copyright:

  • Copyright (c) 2004 Clay Loveless. All Rights Reserved.

Variables

Methods


Inherited Variables

Inherited Methods

Class: VersionControl_SVN

VersionControl_SVN::apiVersion()
Return the VersionControl_SVN API version
VersionControl_SVN::checkCommandRequirements()
Standardized validation of requirements for a command class.
VersionControl_SVN::declareErrorMessages()
Set up VersionControl_SVN error message templates for PEAR_ErrorStack.
VersionControl_SVN::factory()
Create a new VersionControl_SVN command object.
VersionControl_SVN::fetchCommands()
Scan through the SVN directory looking for subclasses.
VersionControl_SVN::fetchShortcuts()
Return the array of pre-defined shortcuts (also known as Alternate Names) for Subversion commands.
VersionControl_SVN::init()
Initialize an object wrapper for a Subversion subcommand.
VersionControl_SVN::parseOutput()
Handle output parsing chores.
VersionControl_SVN::prepare()
Prepare the command switches.
VersionControl_SVN::run()
Run the command with the defined switches.
VersionControl_SVN::setOptions()
Allow for overriding of previously declared options.

Class Details

[line 112]
Subversion Cleanup command manager class

Recursively clean up the working copy indicated by PATH, removing locks, resuming unfinished operations, etc.

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

  1.  $switches = array(
  2.   'config-dir'    =>  'Path to a Subversion configuration directory',
  3.   'diff3-cmd'     =>  'ARG'
  4.                       // Use ARG as merge command.
  5.  );

If a path is not used in the $args array, the default path of '.' will be assumed.

Note: Subversion does not offer an XML output option for this subcommand

Note: There is no output from the svn cleanup command!

Usage example:

  1.  <?php
  2.  require_once 'VersionControl/SVN.php';
  3.  
  4.  // Setup error handling -- always a good idea!
  5.  $svnstack &PEAR_ErrorStack::singleton('VersionControl_SVN');
  6.  
  7.  // Pass array of subcommands we need to factory
  8.  $svn VersionControl_SVN::factory(array('cleanup')$options);
  9.  
  10.  // Define any switches and aguments we may need
  11.  $args = array('/path/to/working_copy');
  12.  
  13.  // Run command
  14.  if ($output $svn->cleanup->run($args)) {
  15.      print_r($output);
  16.  else {
  17.      if (count($errs $svnstack->getErrors())) {
  18.          foreach ($errs as $err{
  19.              echo '<br />'.$err['message']."<br />\n";
  20.              echo "Command used: " $err['params']['cmd'];
  21.          }
  22.      }
  23.  }
  24.  ?>

  • Author: Clay Loveless <clay@killersoft.com>
  • Version: 0.3.1
  • Copyright: Copyright (c) 2004 Clay Loveless. All Rights Reserved.


[ Top ]


Class Variables

$args = array()

[line 132]

Command-line arguments that should be passed outside of those specified in switches.
  • Access: public

Type:   array


[ Top ]

$min_args =  0

[line 141]

Minimum number of args required by this subcommand.

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

  • Access: public

Type:   int


[ Top ]

$passthru =  false

[line 157]

Use exec or passthru to get results from command.
  • Access: public

Type:   bool


[ Top ]

$required_switches = array()

[line 150]

Switches required by this subcommand.

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

  • Access: public

Type:   array


[ Top ]

$valid_switches = array('config-dir',
                                'config_dir',
                                'diff3-cmd'
                                )

[line 120]

Valid switches for svn cleanup
  • Access: public

Type:   array


[ Top ]



Method Detail

prepare   [line 166]

int prepare( void 0)

Prepare the svn subcommand switches.
  • Return: true on success, false on failure. Check PEAR_ErrorStack for error details, if any.

Overrides VersionControl_SVN::prepare() (Prepare the command switches.)

Parameters:

void   0   — 

[ Top ]


Documentation generated on Thu, 10 Dec 2015 05:46:59 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.