svn_statusReturns the status of working copy files and directories
&reftitle.description;
arraysvn_statusstringpathboolrecursiveboolget_allboolupdateboolno_ignore
Returns the status of working copy files and directories, giving modifications,
additions, deletions and other changes to items in the working copy.
&reftitle.parameters;
path
Local path to file or directory to retrieve status of.
&svn.relativepath;
recursive
Whether or not to recursively descend into directories to
retrieve status. Default is &true;.
get_all
Whether or not to return all items, regardless of modification
status. Default is &false;.
update
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;.
no_ignore
Whether or not to disregard svn:ignore properties when scanning
for new files. Default is &false;.
&reftitle.returnvalues;
Returns a numerically indexed array of associative arrays detailing
the status of items in the repository:
Array (
// information on item
)
[1] => ...
)
]]>
The information on the item is an associative array that can contain
the following keys:
path
String path to file/directory of this entry on local filesystem.
text_status
Status of item's text. &svn.referto.status;
repos_text_status
Status of item's text in repository. Only accurate if
update was set to &true;.
&svn.referto.status;
prop_status
Status of item's properties. &svn.referto.status;
repos_prop_status
Status of item's property in repository. Only accurate if
update was set to &true;. &svn.referto.status;
locked
Whether or not the item is locked. (Only set if &true;.)
copied
Whether or not the item was copied (scheduled for addition with
history). (Only set if &true;.)
switched
Whether or not the item was switched using the switch command.
(Only set if &true;)
These keys are only set if the item is versioned:
name
Base name of item in repository.
url
URL of item in repository.
repos
Base URL of repository.
revision
Integer revision of item in working copy.
kind
Type of item, i.e. file or directory. &svn.referto.type;
schedule
Scheduled action for item, i.e. addition or deletion. Constants
for these magic numbers are not available, they can
be emulated by using:
]]>
deleted
Whether or not the item was deleted, but parent revision lags
behind. (Only set if &true;.)
absent
Whether or not the item is absent, that is, Subversion knows that
there should be something there but there isn't. (Only set if
&true;.)
incomplete
Whether or not the entries file for a directory is incomplete.
(Only set if &true;.)
cmt_date
Integer Unix timestamp of last commit date. (Unaffected by update.)
cmt_rev
Integer revision of last commit. (Unaffected by update.)
cmt_author
String author of last commit. (Unaffected by update.)
prop_time
Integer Unix timestamp of last up-to-date time for properties
text_time
Integer Unix timestamp of last up-to-date time for text
&reftitle.notes;
&warn.experimental.func;
&reftitle.examples;
Basic example
This example demonstrates a basic, theoretical usage of this function.
]]>
&example.outputs.similar;
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
)
)
]]>
&reftitle.seealso;
svn_updatesvn_logSVN documentation for svn status