John
John

Reputation: 815

WebSVN doesn't recognize repositories

I am trying to install WebSVN. Everything worked fine so far but my repositories are not recognized.

Inside my user folder /home/svn (svn is the user name) I have several repositories and I want all of them to appear in WebSVN.

This is my config.php:

<?php

$config->setSVNCommandPath('/usr/bin');
$config->setDiffPath('/usr/bin');
$config->setEnscriptPath('/usr/bin');
$config->setSedPath('/bin');
$config->setTarPath('/bin');
$config->setGZipPath('/bin');
$config->parentPath('/home/svn');
$config->addTemplatePath($locwebsvnreal.'/templates/calm/');
$config->addTemplatePath($locwebsvnreal.'/templates/BlueGrey/');
$config->addTemplatePath($locwebsvnreal.'/templates/Elegant/');
$config->addInlineMimeType('text/plain');
$config->setMinDownloadLevel(2);
$config->useGeshi();

set_time_limit(0);
$config->expandTabsBy(8);

$extEnscript[".pl"] = "perl";
$extEnscript[".py"] = "python";
$extEnscript[".sql"] = "sql";
$extEnscript[".java"] = "java";
$extEnscript[".html"] = "html";
$extEnscript[".xml"] = "html";
$extEnscript[".thtml"] = "html";
$extEnscript[".tpl"] = "html";
$extEnscript[".sh"] = "bash";

If I open WebSVN in a browser, it shows an HTTP ERROR 500. If I change the line $config->parentPath('/home/svn'); to $config->parentPath('/home'); it keeps telling me:

Please set up a repository in include/config.php using $config->parentPath or $config->addRepository. See the installation guide for more details.

Am I missing something?

Upvotes: 1

Views: 1938

Answers (3)

Arvind Rawat
Arvind Rawat

Reputation: 59

Add a repository using the below command

$ svnadmin create --fs-type fsfs /home/svn/FirstRepo

then Add a line with your first repository like below in your config.php

$config->addRepository("FirstRepo", "file:///home/svn/FirstRepo");

and also install php-xml.

$ sudo apt install -y php-xml 

Restart the apache2 server.

$ sudo apache2 restart

Upvotes: 0

buer
buer

Reputation: 330

With all things set, I also kept experiencing this issue. Browsing the Apache error log file I encountered an interesting bit regarding a missing xml function (using Ubuntu 16.04 LTS, the default php installation which is 7.0 at the time being). This could be easily solved by installing php-xml with

apt-get install php-xml -y

Hope this is your case as well.

Upvotes: 1

tgharold
tgharold

Reputation: 731

In addition to telling WebSVN where to find your repositories with parentPath (which just lets you shorten later paths), you have to create one entry (using addRepository) per repository that you want to display on the WebSVN home page.

The addRepository() function takes two arguments. The first is the visible name, the second is the path to the SVN repository.

Reference link: Use Subversion, Apache, and WebSVN to view your repositories

(It's been a while since I setup WebSVN, but I did have to list each one individually.)

Upvotes: 0

Related Questions