svn_blame

(PECL svn >= 0.3.0)

svn_blame — ファイルの SVN blame を取得する

説明

function svn_blame(string $repository_url, int $revision_no = SVN_REVISION_HEAD): array

リポジトリの URL を指定して、ファイルの SVN blame を取得します。

パラメータ

repository_url

リポジトリの URL。

revision_no

リビジョン番号。

戻り値

SVN blame 情報を配列で返します。行ごとに区切られ、 リビジョン番号と行番号、コードの行、作者、日付が含まれます。

例

例1 svn_blame() の例

<?php
$svnurl = 'http://svn.example.org/svnroot/foo/trunk/index.php';

print_r( svn_blame($svnurl) );

?>

上の例の出力は、 たとえば以下のようになります。

Array
(
    [0] = Array
          (
           [rev] = 1
           [line_no] = 1
           [line] = Hello World
           [author] = joesmith
           [date] = 2007-07-02T05:51:26.628396Z
          )
    [1] = Array
          ...

参考

  • svn_diff() - ふたつのパスの差分を再帰的に取得する
  • svn_logs()
  • svn_status() - Returns the status of working copy files and directories

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top