3

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();
peterh
  • 11,875
  • 18
  • 85
  • 108
PvdL
  • 1,578
  • 1
  • 20
  • 33

1 Answers1

4

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.

Christian Specht
  • 35,843
  • 15
  • 128
  • 182
netmano
  • 322
  • 1
  • 13