Repository Browser Only - "Repository moved permanently to… please relocate”

∥☆過路亽.° 提交于 2019-12-12 18:14:53

问题


I have the repository root at http://localhost/svn/ and a couple of projects

http://localhost/svn/project1
http://localhost/svn/project2
http://localhost/svn/project3
...

TortoiseSVN works all the time with these projects, only every time I try to access the root http://localhost/svn/ by using "Repository Browser" it returns "Repository moved permanently to http://localhost/; please relocate", while I'm sure the root is fine as I can open it in browsers and see a list of all projects, it's just not working in "Repository Browser". Any ideas?


回答1:


I suppose you have one SVN repository in each one of svn/project1, svn/project2, svn/project3 -- and that you have no SVN-related anything in svn.

You can see the content of svn in a browser because that directory is served by your webserver -- but it's not served as an SVN-related thing : it's just an HTML page that's sent to your browser.

As such, TortoiseSVN cannot work with it : svn is not an SVN repository.




回答2:


This has more to do with your Apache server configuration. You must configure the root of your repository there. In other words, you must have some something like this in your configuration files of your localhost:

<Location /svn>
  DAV svn
  SVNPath /var/svn/repository
</Location>

This single repository is where your three projects must reside. If your projects reside in single repositories, then you will need three different locations in your Apache server configuration as well.

So, the question here is, do you have three different subversion repositories, or just three different project folders under the same repo?

You can read more about your Apache server configuration in the book Version Control With Subversion, specifically Chapter 6 on the section The Apache Server

If you have multiple repositories as you seem to indicate, then you need to configure a SVNParentPath

<Location /svn>
  DAV svn

  SVNParentPath /var/svn
</Location>

And this should be where all your repos will reside on the server.



来源:https://stackoverflow.com/questions/5687621/repository-browser-only-repository-moved-permanently-to-please-relocate

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