【问题标题】:WebSVN automatic multiple RepositoriesWebSVN自动多个Repositories
【发布时间】:2011-09-25 19:18:42
【问题描述】:

我已经开始使用 WebSVN,我想知道是否有正确/合适的方式来自动添加我的所有存储库?

我已通过将 /etc/websvn/svn_deb_conf.inc 编辑为以下内容来解决此问题:

function getDirectoryList($d) {
    $r = array();
    $h = opendir($d);
    while ($f = readdir($h)) {
            if ($f != "." && $f != "..") {
                    $r[] = $f;
            }
    }
    closedir($h);
    return $r;
}

$config->parentPath("/var/lib/svn");
$files=getDirectoryList('/home/svn-repos/');
foreach($files as $dir) {
    $config->addRepository($dir, "file:///home/svn-repos/".$dir);
}
$config->setEnscriptPath("/usr/bin");
$config->setSedPath("/bin");
$config->useEnscript();

【问题讨论】:

    标签: php svn repository websvn


    【解决方案1】:

    您应该将parentPath() 设置为您的svn repo root,在您的情况下:

    $config->parentPath('/home/svn-repos');
    

    就是这样。 您在/home/svn-repos 中的所有存储库都将在那里,这意味着 parentPath。

    【讨论】:

      猜你喜欢
      • 2017-05-06
      • 2016-01-08
      • 2011-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多