Forum und email

svn_log

(PECL svn:0.1-0.2)

svn_log — Returns the commit log messages of a repository URL

Descrizione

array svn_log ( string $repos_url [, int $revision_no ] )

svn_log() returns the complete history of the item at the repository URL repos_url , or the history of a specific revision if revision_no is set. This function is equivalent to svn log --verbose -r $revision_no $repos_url .

Avviso

For repositories with large histories, the output may be quite large (one array item for every revision of the item). This function does not support the --limit NUM flag, nor does it support revision ranges (revision_no must be an integer).

Elenco dei parametri

repos_url

Repository URL of the item to retrieve log history from.

revision_no

Revision number of the log to retrieve. Use SVN_REVISON_HEAD to retrieve the log for the most recent revision.

Valori restituiti

On success, this function returns an array file listing in the format of:

[0] => Array, ordered most recent (highest) revision first
(
    [rev] => integer revision number
    [author] => string author name
    [msg] => string log message
    [date] => string date formatted per ISO 8601, i.e. date('c')
    [paths] => Array, describing changed files
        (
            [0] => Array
                (
                    [action] => string letter signifying change
                    [path] =>  absolute repository path of changed file
                )
            [1] => ...
        )
)
[1] => ...

Nota: The output will always be a numerically indexed array of arrays, even when there are none or only one log message(s).

The value of action is a subset of the » status output in the first column, where possible values are:

Actions
Letter Description
M Item/props was modified
A Item was added
D Item was deleted
R Item was replaced

If no changes were made to the item, an empty array is returned.

Note

Avviso

Questa funzione è SPERIMENTALE. Ovvero, il comportamento di questa funzione, il nome di questa funzione, in definitiva tutto ciò che è documentato qui può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l'uso di questa funzione è a vostro rischio.

Esempi

Example#1 svn_log() example

<?php
print_r
svn_log('https://www.example.com/'23) );
?>

Il precedente esempio visualizzerà qualcosa simile a:

Array
(
    [0] =&g