Javascript debugger
Website design
↑
Returns the status of working copy files and directories, giving modifications, additions, deletions and other changes to items in the working copy.
Local path to file or directory to retrieve status of.
Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script's working directory, use realpath() or dirname(__FILE__).
Whether or not to recursively descend into directories to
retrieve status. Default is TRUE.
Whether or not to return all items, regardless of modification
status. Default is FALSE.
Whether or not to return information from the server on
whether or not the working copy is up-to-date (specifically,
entries will be added for items that are out-of-date along with
the regular modification checks). Default is FALSE.
Whether or not to disregard svn:ignore properties when scanning
for new files. Default is FALSE.
Returns a numerically indexed array of associative arrays detailing the status of items in the repository:
Array (
[0] => Array (
// information on item
)
[1] => ...
)The information on the item is an associative array that can contain the following keys:
pathtext_statusrepos_text_statusTRUE.
Refer to status constants for possible values.
prop_statusrepos_prop_statusTRUE. Refer to status constants for possible values.
lockedTRUE.)
copiedTRUE.)
switchedTRUE)
These keys are only set if the item is versioned:
nameurlreposrevisionkindscheduleScheduled action for item, i.e. addition or deletion. Constants for these magic numbers are not available, they can be emulated by using:
<?php
if (!defined('svn_wc_schedule_normal')) {
define('svn_wc_schedule_normal', 0); // nothing special
define('svn_wc_schedule_add', 1); // item will be added
define('svn_wc_schedule_delete', 2); // item will be deleted
define('svn_wc_schedule_replace', 3); // item will be added and deleted
}
?>deletedTRUE.)
absentTRUE.)
incompleteTRUE.)
cmt_datecmt_revcmt_authorprop_timetext_timeThis function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.
This example demonstrates a basic, theoretical usage of this function.
<?php
print_r(svn_status(realpath('wc')));
?>The above example will output something similar to:
Array (
[0] => Array (
[path] => /home/bob/wc/sandwich.txt
[text_status] => 8 // item was modified
[repos_text_status] => 1 // no information available, use update
[prop_status] => 3 // no changes
[repos_prop_status] => 1 // no information available, use update
[name] => sandwich.txt
[url] => http://www.example.com/svnroot/deli/trunk/sandwich.txt
[repos] => http://www.example.com/svnroot/
[revision] => 123
[kind] => 1 // file
[schedule] => 0 // no special actions scheduled
[cmt_date] => 1165543135
[cmt_rev] => 120
[cmt_author] => Alice
[prop_time] => 1180201728
[text_time] => 1180201729
)
)