array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'function.svn-status.php', 1 => 'svn_status', 2 => 'Returns the status of working copy files and directories', ), 'up' => array ( 0 => 'ref.svn.php', 1 => 'SVN Функції', ), 'prev' => array ( 0 => 'function.svn-revert.php', 1 => 'svn_revert', ), 'next' => array ( 0 => 'function.svn-update.php', 1 => 'svn_update', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/svn/functions/svn-status.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL svn >= 0.1.0)
svn_status — Returns the status of working copy files and directories
Returns the status of working copy files and directories, giving modifications, additions, deletions and other changes to items in the working copy.
path
Local path to file or directory to retrieve status of.
Зауваження: Відносні шляхи розкриваються так, ніби поточною текою є та, що містить виконуваний файл PHP. Щоб використовувати теку, в якій виконується скрипт, застосовується функція realpath() або dirname(__FILE__).
flags
Any combination of Svn::NON_RECURSIVE
,
Svn::ALL
(regardless of modification status),
Svn::SHOW_UPDATES
(entries will be added for items
that are out-of-date), Svn::NO_IGNORE
(disregard
svn:ignore
properties when scanning for new files)
and Svn::IGNORE_EXTERNALS
.
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:
update
was set to true
.
Інформація про допустимі значення є на сторінці Константи
статусу.
update
was set to true
. Інформація про допустимі значення є на сторінці Константи
статусу.
true
.)
true
.)
true
)
These keys are only set if the item is versioned:
<?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
}
?>
true
.)
true
.)
true
.)
update
.)
update
.)
update
.)
Приклад #1 Basic example
This example demonstrates a basic, theoretical usage of this function.
<?php
print_r(svn_status(realpath('wc')));
?>
Поданий вище приклад виведе щось схоже на:
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 ) )
Ця функція — ЕКСПЕРИМЕНТАЛЬНА. Її поведінка, назва та документація можуть бути змінені без попередження в майбутніх випусках PHP. Використання цієї функції є ризикованим для розробника.