svn_log
svn_log
Returns the commit log messages of a repository URL
array **svn_log** string $repos_url int $start_revision int $end_revision int $limit int $flags
returns the complete history of the item at the repository URL
, or the history of a specific revision
if is set. This function is equivalent
to .
svn_log``repos_url``start_revision
repos_urlRepository URL of the item to retrieve log history from.
start_revision
Revision number of the first log to retrieve. Use
to retrieve the log from
the most recent revision.
SVN_REVISION_HEAD
end_revision
Revision number of the last log to retrieve. Defaults to
if specified or to
otherwise.
start_revision``SVN_REVISION_INITIAL
limitNumber of logs to retrieve.
flags
Any combination of ,
and
.
SVN_OMIT_MESSAGES``SVN_DISCOVER_CHANGED_PATHS``SVN_STOP_ON_COPY
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] => ...
Opmerking: > 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 is a subset of the
, where possible values are:
actionstatus output
in the first column
If no changes were made to the item, an empty array is returned.
Voorbeeld: example
<?php
print_r( svn_log('http://www.example.com/', 23) );
?>
Array
(
[0] => Array
(
[rev] => 23
[author] => 'joe'
[msg] => 'Add cheese and salami to our sandwich.'
[date] => '2007-04-06T16:00:27-04:00'
[paths] => Array
(
[0] => Array
(
[action] => 'M'
[path] => '/sandwich.txt'
)
)
)
)
SVN documentation on svn log