svn_import
(PECL svn:0.2)
svn_import — Imports an unversioned path into a repository
Description
Commits unversioned path into repository at url . If path is a directory and nonrecursive is FALSE, the directory will be imported recursively.
Parameters
- path
-
Path of file or directory to import.
Note: Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script's working directory, use realpath() or dirname(__FILE__).
- url
-
Repository URL to import into.
- nonrecursive
-
Whether or not to refrain from recursively processing directories.
Return Values
成功回傳TRUE失敗回傳FALSE。
Notes
這個函數是實驗性質的。這個函數的行為、名稱、和關於此函數的任何其他文件在未來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 https://www.example.com/svnroot/incoming/abc, use:
<?php
svn_import(realpath('new-files'), 'https://www.example.com/svnroot/incoming/abc', false);
?>