svn_update
(PECL svn >= 0.1.0)
svn_update — Update working copy
説明
$path
[, int $revno = SVN_REVISION_HEAD
[, bool $recurse = TRUE
]] ) : int
Update working copy at path to revision
revno. If recurse is true,
directories will be recursively updated.
パラメータ
-
path -
Path to local working copy.
注意: 相対パスは、PHP バイナリが存在するディレクトリを基準として解決されます。呼び出しもとのスクリプトの作業ディレクトリを基準とするには、realpath() あるいは dirname(__FILE__) を使用してください。
-
revno -
Revision number to update to, default is
SVN_REVISION_HEAD. -
recurse -
Whether or not to recursively update directories.
返り値
Returns new revision number on success, returns FALSE on failure.
注意
この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。
例
例1 Basic example
This example demonstrates basic usage of this function:
<?php
echo svn_update(realpath('working-copy'));
?>
上の例の出力は、 たとえば以下のようになります。
234
参考
- svn_checkout() - リポジトリから作業コピーをチェックアウトする
- svn_commit() - Sends changes from the local working copy to the repository
- » SVN documentation for svn update