1

I've successfully installed VisualSVN server on my computer and setup it's repository root on network, to save all files on another computer. My repositories root is \\file-server\svn\
I can access all my repositories using build-in web browser by going to https://localhost/svn/, but I wanted to install WebSVN.

When my repositories are on local drive then I have no problem viewing them with WebSVN, but I have problem when I want to access network location.

In config.php I have this config:

 $config->parentPath('c:\\Repositories');
 //$config->parentPath('file:///\file-server\svn');

When I comment first line and uncomment second I get following error:

Error running this command: " "C:\Program Files\VisualSVN Server\bin\svn" --non-interactive --config-dir /tmp log --xml --quiet "file:///file:////file-server/svn/TestRepo/@"" --limit 1
svn: E180001: Unable to connect to a repository at URL 'file:///file:/file-server/svn/TestRepo'
svn: E180001: Unable to open an ra_local session to URL
svn: E180001: Unable to open repository 'file:///file:/file-server/svn/TestRepo'

I was trying to map my network location as drive, but that didn't help.

Is there an option to setup network location in WebSVN?

Misiu
  • 123
  • 9
  • 1
    You could try new VisualSVN Server's built-in web interface for repos. It doesn't require you to perform any manual configuration steps, it works right out of the box. The new web ui was introduced in VisualSVN Server 3.2 release, see https://www.visualsvn.com/server/changes/3.2/#commit-view – bahrep Dec 09 '14 at 12:39

2 Answers2

0

Here, WebSVN tries to connect file:///file:////file-server/svn/TestRepo/@ which is invalid location. File protocol connects to local filesystem. Try

svn://file-server/svn/TestRepo

Or,

https://localhost/svn/TestRepo
sundeep
  • 146
  • 3
  • I'm able to add single repository using `$config->addRepository('TestRepo', 'file:////\file-server\svn\TestRepo');` but I would like to add folder containing multiple repositories, using `parentPath`, this one gives me error – Misiu Feb 04 '13 at 09:08
  • Yes! some tweaking in ParentPath Class of configclass.php is required. As opendir() could be used with file and ftp protocols only. – sundeep Feb 04 '13 at 10:16
  • thanks for tip, but I don't write in php as much to be able to tweak that class correctly, but I give it a try :) – Misiu Feb 04 '13 at 10:45
  • I've looked inside configclass and what it does internally is iteration over every subdirectory in specific path then it is adding repositories, so it is doing everything that my temporary solution does :) – Misiu Feb 04 '13 at 11:00
  • PHP has SVN functions (http://php.net/manual/en/ref.svn.php) but they all work when we have the handle on the filesystem for a repository. – sundeep Feb 04 '13 at 11:57
  • 1
    I know those svn functions (I read about them) but my intention wasn't creating web gui by my self, instead I wanted to use already existing one - WebSVN. I just wanted to get it working with network repository location. – Misiu Feb 04 '13 at 12:17
0

I've managed to create temporary solution: instead using parentPath I'm adding repositories in loop:

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


$files=getDirectoryList('file:////\file-server\svn');
foreach($files as $dir) {
    $config->addRepository($dir, 'file:////\file-server\\svn\\'.$dir);
}

This is same loop that configclass.php is doing inside, but mine fix error when adding repositories from network location.

If anyone knows how to use parentPath instead this solution or how to tweak configclass.php to correctly add repositories please add answer.

Misiu
  • 123
  • 9