文字

svn_import

(PECL svn >= 0.2.0)

svn_importImports an unversioned path into a repository

说明

bool svn_import ( string $path , string $url , bool $nonrecursive )

Commits unversioned path into repository at url. If path is a directory and nonrecursive is FALSE , the directory will be imported recursively.

参数

path

Path of file or directory to import.

Note: 相对路径将会以PHP执行文件所在目录作为当前工作目录进行解析。如果希望依据脚本所在目录解析, 使用 realpath() 或 dirname(__FILE__)。

url

Repository URL to import into.

nonrecursive

Whether or not to refrain from recursively processing directories.

返回值

成功时返回 TRUE , 或者在失败时返回 FALSE

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

范例

Example #1 Basic example

This example demonstrates a basic use-case of this function. To import a directory named new-files into the repository at http://www.example.com/svnroot/incoming/abc, use:

<?php
svn_import
( realpath ( 'new-files' ),  'http://www.example.com/svnroot/incoming/abc' false );
?>

参见

  • svn_add() - 计划在工作目录添加项
  • » SVN documentation for svn import
上一篇: 下一篇: