(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.
pathPath to local working copy.
注意: 相對(duì)路徑將會(huì)以PHP執(zhí)行文件所在目錄作為當(dāng)前工作目錄進(jìn)行解析。如果希望依據(jù)腳本所在目錄解析, 使用realpath() 或 dirname(__FILE__)。
revno
Revision number to update to, default is SVN_REVISION_HEAD.
recurseWhether or not to recursively update directories.
Returns new revision number on success, returns false on failure.
示例 #1 Basic example
This example demonstrates basic usage of this function:
<?php
echo svn_update(realpath('working-copy'));
?>
以上例程的輸出類似于:
234
此函數(shù)是實(shí)驗(yàn)性的。此函數(shù)的表象,包括名稱及其相關(guān)文檔都可能在未來的 PHP 發(fā)布版本中未通知就被修改。使用本函數(shù)風(fēng)險(xiǎn)自擔(dān)。