phpsvnrepositorywebsvn

WebSVN automatic multiple Repositories


I have started using WebSVN and I'm wondering if there is a correct/propper way to automaticly add all my repositories?

I have worked around this by editing /etc/websvn/svn_deb_conf.inc to the following:

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();

Solution

  • You should set the parentPath() to your svn repo root, in your case:

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

    That's all. All your repos inside /home/svn-repos will be there, that's means parentPath.