[line 188]
Subversion Status command manager class
Print the status of working copy files and directories.
There are many possible output values from this command. The following is from 'svn help status':
With no args, print only locally modified items (no network access). With -u, add working revision and server out-of-date information. With -v, print full revision information on every item.
The first five columns in the output are each one character wide: First column: Says if item was added, deleted, or otherwise changed ' ' no modifications 'A' Added 'C' Conflicted 'D' Deleted 'G' Merged 'I' Ignored 'M' Modified 'R' Replaced 'X' item is unversioned, but is used by an externals definition '?' item is not under version control '!' item is missing (removed by non-svn command) or incomplete '~' versioned item obstructed by some item of a different kind Second column: Modifications of a file's or directory's properties ' ' no modifications 'C' Conflicted 'M' Modified Third column: Whether the working copy directory is locked ' ' not locked 'L' locked Fourth column: Scheduled commit will contain addition-with-history ' ' no history scheduled with commit '+' history scheduled with commit Fifth column: Whether the item is switched relative to its parent ' ' normal 'S' switched
The out-of-date information appears in the eighth column (with -u): '*' a newer revision exists on the server ' ' the working copy is up to date
Remaining fields are variable width and delimited by spaces: The working revision (with -u or -v) The last committed revision and last committed author (with -v) The working copy path is always the final field, so it can include spaces.
Example output: svn status wc M wc/bar.c A + wc/qax.c
svn status -u wc M 965 wc/bar.c * 965 wc/foo.c A + 965 wc/qax.c Head revision: 981
svn status --show-updates --verbose wc M 965 938 kfogel wc/bar.c * 965 922 sussman wc/foo.c A + 965 687 joe wc/qax.c 965 687 joe wc/zig.c Head revision: 981
$switches is an array containing one or more command line options defined by the following associative keys:
$switches = array(
'u' => true|false,
// display update information
'show-updates' => true|false,
// display update information
'v [verbose]' => true|false,
// prints extra information
'N' => true|false,
// operate on a single directory only
'non-recursive' => true|false,
// operate on a single directory only
'q [quiet]' => true|false,
// prints as little as possible
'no-ignore' => true|false,
// disregard default and svn:ignore property ignores
'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',
'changelist => 'Changelist to operate on'
);
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: <?php
require_once 'VersionControl/SVN.php';
// Set up runtime options. Will be passed to all
// subclasses.
// Pass array of subcommands we need to factory
// Define any switches and aguments we may need
$switches = array('u' => true, 'v' => true);
$args = array('/path/to/working/copy/TestProj/trunk');
// Run command
try {
}
?>