1

我正在尝试安装 WebSVN。到目前为止一切正常,但我的存储库未被识别。

在我的用户文件夹/home/svnsvn是用户名)中,我有几个存储库,我希望它们都出现在 WebSVN 中。

这是我的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";

如果我在浏览器中打开 WebSVN,它会显示一个HTTP ERROR 500. 如果我将行更改$config->parentPath('/home/svn');$config->parentPath('/home');它会一直告诉我:

请使用 $config->parentPath 或 $config->addRepository 在 include/config.php 中设置存储库。有关详细信息,请参阅安装指南。

我错过了什么吗?

4

3 回答 3

1

一切就绪后,我也一直遇到这个问题。浏览 Apache 错误日志文件时,我遇到了一个关于缺少 xml 函数的有趣信息(使用 Ubuntu 16.04 LTS,默认的 php 安装,当时是 7.0)。这可以通过安装 php-xml 轻松解决

apt-get install php-xml -y

希望这也是你的情况。

于 2017-03-14T12:07:38.597 回答
0

使用以下命令添加存储库

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

然后在您的第一个存储库中添加一行,如下所示 config.php

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

并安装 php-xml。

$ sudo apt install -y php-xml 

重新启动 apache2 服务器。

$ sudo apache2 restart
于 2017-03-27T14:36:29.050 回答
0

除了使用 parentPath 告诉 WebSVN 在哪里找到您的存储库(它只是让您缩短以后的路径)之外,您必须为每个要在 WebSVN 主页上显示的存储库创建一个条目(使用 addRepository)。

addRepository() 函数有两个参数。第一个是可见名称,第二个是 SVN 存储库的路径。

参考链接:使用 Subversion、Apache 和 WebSVN 查看您的存储库

(我设置 WebSVN 已经有一段时间了,但我确实必须单独列出每个。)

于 2016-06-21T20:21:35.097 回答