Weird Apache2.2 SVN error, “Expected repository format '3' or '5'; found format '9'”

本小妞迷上赌 提交于 2019-12-01 23:22:06

问题


I've had a repo that I would access, using TortoiseSVN, from only the same computer on which the Subversion win32 service was running, and it's been working for a while now. I decided to try to set up mod_dav_svn to be able to get at it from elsewhere. When I try to access it, I get this error in the browser:

<D:error>
<C:error/>
<m:human-readable errcode="165005">
Could not open the requested SVN filesystem
</m:human-readable>
</D:error>

...and these errors in the log:

 (20014)Internal error: Expected repository format '3' or '5'; found format '9'
 Could not fetch resource information.  [500, #0]
 Could not open the requested SVN filesystem  [500, #165005]
 Could not open the requested SVN filesystem  [500, #165005]

Here's what's in my .conf:

LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

and

DAV svn
SVNPath e:/dev/.svn

I put the /.svn because before I did that, I was getting the same error text on the client (but with code 720002) and the log showed Apache was looking for e:/dev/format, which doesn't exist, but e:/dev/.svn/format does.

I read this, and noticing that my subversion was 1.5.1 and 1.5.5 was out, and that I had upgraded TortoiseSVN recently, I thought that maybe there was some incompatibility (this may not make sense, I don't know how it works exactly.) So I downloaded 1.5.5, stopped the service, copied the DLLs and EXEs overtop, restarted the service, copied the new .so files to Apache's modules directory, and restarted httpd. No luck.

Any suggestions? This particular 'format 9' thing seems to be rare...


回答1:


please bear with me through the following explantion, it justifies my hypothesis on your problem and will give you some insights as to how SVN works:

In subversion you have 2 places containing files: the repository and the working copy.

The repository stores the history, you checkout from the repository in a working copy work there and commit back to the repository.

Svnervice and apache svn both allow you to expose a repository Tortoise allows you to create working copies from an exposed repository.

From what you posted I think you are trying to expose a working copy instead of a repository (the ".svn" folder is typical of a working copy and I bet the e:\dev.svn is a checkout directory).

go in the service management and find out the command line which runs the svn service it should contain a string like the following : svnserve -d -r {somepath}

The {somepath} is the path to your repository. This is the path you should provide in the SVNPath configuration directive of apache.

One last thing : do NOT allow R/W access to the same repository using both svnserve and apache svn, it will probably corrupt your repository by exposing it to race conditions on the transaction locks



来源:https://stackoverflow.com/questions/557701/weird-apache2-2-svn-error-expected-repository-format-3-or-5-found-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!