我已经开始使用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();发布于 2011-10-27 21:44:48
您应该将parentPath()设置为您的svn repo根目录,在本例中:
$config->parentPath('/home/svn-repos');就这样。您在/home/svn-repos中的所有repos都会在那里,也就是说parentPath。
https://stackoverflow.com/questions/6532140
复制相似问题