1

我们在 SVN 1.6.11 上,今天刚刚升级到 1.8.8。我们可以使用 https:// 和 file:// 签入和签出文件

我们之前安装的 WebSVN 2.3.3 可以正常工作,但现在给出一个带有此错误的空白页面:

XML 错误:在第 3 行第 0 字节 28 列未找到元素 (3)\ncmd: svn --non-interactive --config-dir /tmp log --xml --verbose -r HEAD:1 'file:///主页/ckhronos/svn/repos/@HEAD' --limit 2

如果我们运行: svn --non-interactive --config-dir /tmp log --xml --verbose -r HEAD:1 'file:///path/to/repos/@HEAD' --limit 2

从命令行我们得到一个合理的输出:

<?xml version="1.0" encoding="UTF-8"?>
<log>
<logentry
   revision="26184">
<author>authorname</author>
<date>2014-04-02T16:09:30.683040Z</date>
<msg>Short message.
</msg>
</logentry>
<logentry
   revision="26183">
<author>authorname</author>
<date>2014-04-02T15:46:03.903486Z</date>
<paths>
<path
   prop-mods="false"
   text-mods="true"
   kind="file"
   action="M">/path/to/file/edited.txt</path>
</paths>
<msg>Long message here</msg>
</logentry>
</log>

我们使用 PHP 5.4 运行 CentOS 6.5。我们从源代码构建颠覆。有谁知道我们为什么会收到这个错误?

4

1 回答 1

1

服务器上有两个版本的 SVN。一个是 /usr/bin/svn 中的旧 1.6.11,另一个是 /usr/local/bin/svn 中的新 1.8.8 版本。从命令行我从新的 /usr/local/bin/svn 版本中退出。在运行该命令的 PHP 中,它是在旧版本的 svn 中加载的。

一旦我更新了指向正确版本 svn 的路径,一切都很好。

顺便说一句,我使用以下方法发现了这个错误:

echo stream_get_contents($pipes[2]);

查看脚本的实际输出。

于 2014-04-13T01:56:54.447 回答