大家好,我已经开始使用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();
解决方法:
在这种情况下,应将parentPath()设置为svn存储库根目录:
$config->parentPath('/home/svn-repos');
就这样.
您在/ home / svn-repos内的所有存储库都在那里,这意味着parentPath.
原文地址:https://codeday.me/bug/20191102/1991617.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。