VersionControl_SVN_Command | --VersionControl_SVN_Command_List
List directory entries in the repository
If the 'target' option is omitted, '.' is assumed, meaning the repository URL of the current working directory.
$switches is an array containing one or more command line options defined by the following associative keys:
array( '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 'v [verbose]' => true|false, // prints extra information 'R' => true|false, // descend recursively 'recursive' => true|false, // descend recursively 'username' => 'Subversion repository login', 'password' => 'Subversion repository password', 'no-auth-cache' => true|false, // Do not cache authentication tokens 'config-dir' => 'Path to a Subversion configuration directory' );
With the 'verbose' option set to true, the following fields show the status of the item:
Revision number of the last commit Author of the last commit Size (in bytes) Date and time of the last commit
Usage example: <?php require_once 'VersionControl/SVN.php'; // Set up runtime options. Will be passed to all // subclasses. $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW); // Pass array of subcommands we need to factory $svn = VersionControl_SVN::factory(array('list'), $options); // Define any switches and aguments we may need $switches = array('R' => true, 'username' => 'user', 'password' => 'pass'); $args = array('svn://svn.example.com/repos/TestProject'); // Run command try { print_r($svn->list->run($args, $switches)); } catch (VersionControl_SVN_Exception $e) { print_r($e->getMessage()); } ?>
<?php require_once 'VersionControl/SVN.php'; // Set up runtime options. Will be passed to all // subclasses. $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW); // Pass array of subcommands we need to factory $svn = VersionControl_SVN::factory(array('list'), $options); // Define any switches and aguments we may need $switches = array('R' => true, 'username' => 'user', 'password' => 'pass'); $args = array('svn://svn.example.com/repos/TestProject'); // Run command try { print_r($svn->list->run($args, $switches)); } catch (VersionControl_SVN_Exception $e) { print_r($e->getMessage()); } ?>
Note: Subversion does not offer an XML output option for this subcommand
[line 140]
VersionControl_SVN_Command_List __construct( )