mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

Patch provided by alan_k. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344988 c90b9560-bf6c-de11-be94-00142212c4b1
404 lines
10 KiB
XML
404 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.svn-status" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>svn_status</refname>
|
|
<refpurpose>Returns the status of working copy files and directories</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>svn_status</methodname>
|
|
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns the status of working copy files and directories, giving modifications,
|
|
additions, deletions and other changes to items in the working copy.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>path</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Local path to file or directory to retrieve status of.
|
|
</para>
|
|
&svn.relativepath;
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>flags</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Any combination of <constant>Svn::NON_RECURSIVE</constant>,
|
|
<constant>Svn::ALL</constant> (regardless of modification status),
|
|
<constant>Svn::SHOW_UPDATES</constant> (entries will be added for items
|
|
that are out-of-date), <constant>Svn::NO_IGNORE</constant> (disregard
|
|
<literal>svn:ignore</literal> properties when scanning for new files)
|
|
and <constant>Svn::IGNORE_EXTERNALS</constant>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns a numerically indexed array of associative arrays detailing
|
|
the status of items in the repository:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
Array (
|
|
[0] => Array (
|
|
// information on item
|
|
)
|
|
[1] => ...
|
|
)
|
|
]]>
|
|
</screen>
|
|
<para>
|
|
The information on the item is an associative array that can contain
|
|
the following keys:
|
|
</para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><varname>path</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
String path to file/directory of this entry on local filesystem.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>text_status</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Status of item's text. &svn.referto.status;
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>repos_text_status</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Status of item's text in repository. Only accurate if
|
|
<parameter>update</parameter> was set to &true;.
|
|
&svn.referto.status;
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>prop_status</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Status of item's properties. &svn.referto.status;
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>repos_prop_status</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Status of item's property in repository. Only accurate if
|
|
<parameter>update</parameter> was set to &true;. &svn.referto.status;
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>locked</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Whether or not the item is locked. (Only set if &true;.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>copied</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Whether or not the item was copied (scheduled for addition with
|
|
history). (Only set if &true;.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>switched</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Whether or not the item was switched using the switch command.
|
|
(Only set if &true;)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
<para>
|
|
These keys are only set if the item is versioned:
|
|
</para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><varname>name</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Base name of item in repository.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>url</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
URL of item in repository.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>repos</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Base URL of repository.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>revision</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Integer revision of item in working copy.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>kind</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Type of item, i.e. file or directory. &svn.referto.type;
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>schedule</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Scheduled action for item, i.e. addition or deletion. Constants
|
|
for these magic numbers are not available, they can
|
|
be emulated by using:
|
|
</simpara>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?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
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>deleted</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Whether or not the item was deleted, but parent revision lags
|
|
behind. (Only set if &true;.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>absent</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
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;.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>incomplete</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Whether or not the entries file for a directory is incomplete.
|
|
(Only set if &true;.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>cmt_date</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Integer Unix timestamp of last commit date. (Unaffected by <parameter>update</parameter>.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>cmt_rev</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Integer revision of last commit. (Unaffected by <parameter>update</parameter>.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>cmt_author</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
String author of last commit. (Unaffected by <parameter>update</parameter>.)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>prop_time</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Integer Unix timestamp of last up-to-date time for properties
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><varname>text_time</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
Integer Unix timestamp of last up-to-date time for text
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<!--
|
|
<varlistentry>
|
|
<term><varname></varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
-->
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
&warn.experimental.func;
|
|
</refsect1>
|
|
|
|
<!-- Use when ERRORS exist
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
When does this function throw E_* level errors, or exceptions?
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
<!-- Use when a CHANGELOG exists
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>Enter the PHP version of change here</entry>
|
|
<entry>Description of change</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Basic example</title>
|
|
<para>
|
|
This example demonstrates a basic, theoretical usage of this function.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
print_r(svn_status(realpath('wc')));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
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
|
|
)
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>svn_update</function></member>
|
|
<member><function>svn_log</function></member>
|
|
<member><link xlink:href="&url.svn.manual.status;">SVN documentation for svn status</link></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|