15
votes

In the repo browser when I enter the svn root (http://servername/svn) directory I get this message "Repository moved permanently to 'http//....' please relocate

There are several projects in this repository and I can access/checkout/update each project but I can't even access the root.

How can I fix this?

11
I have the same problem. A local checkout can update correctly, but commands such as svn ls http://server.com/svn/project fail with error 301 relocated whether I have a trailing / or not.Matt Connolly

11 Answers

5
votes

I'm assuming that you're not the server admin and that you're relatively new to svn...

You'll need to tell your working copies that the remote repo has moved (see the svn book for info on how to do this). You'll also need to use the new root for your remote repo browsing.

2
votes

I got the same message because I had a double underline character within one folder name; e. g. SVNPath C:/xampp/my/path/to/the/repo/with/double/__underline/repo-folder

I removed them and it works (remember restarting the webserver)

1
votes

Just in case this also helps anyone. I found this message can appear if you have a DocumentRoot defined in your vhost.

0
votes

Make sure you have the locaction block specified correctly in your apache config file:

<Location /svn>

not

<Location /svn/>
0
votes

Usually the root is at http://servername/svn/repositoryname. I think there are some known problems when you have the repository in the root (ie when your URL is what you describe, and the name of the repos is 'svn').

Edit: This means there's no level above /svn/proj1/ as far as Subversion is concerned. It is also impossible to move (with keeping history) items from /svn/proj1/ to /svn/proj2/. I think that you've been too active creating repositories, causing problems when trying to reuse items frome one repository in the other. See a discussion about multiple repositories vs a single one, and the faq entry on how to merge multiple repositories into one.

You might want to take a look at externals if you want to re-use part of the proj1 repository in the proj2 repository.

0
votes

Check your Apache Configuration and remove/comment the ErrorDocument redirection. That's all.

0
votes

This question is quite old now but for completeness sake; I'm accessing the SVN server by IP address but I received this message after adding a redirect in .htaccess file from a non-www domain to a www domain. So be careful with this.

0
votes

I have faced the same problem. Considering that you are not admin of the server, as I am not, I've used the svn switch --relocate command with success:

svn switch --relocate https://my.server.url/svn/projectname https://my.server.url/new.dictory/authscm/username/svn/projectname

Of course, these two URLs and their relative directories happened to be in my case, but in general lines this solution worked fine for me, i.e., using switch --relocate from the old to the new URL.

0
votes

I've had this with spaces in the SVN url and using Cornerstone. Using terminal svn checkout <url> did work instead.

0
votes

In my case if was the wrong Proxy settings for Jenkins.

0
votes

check if you have duplicate name in svn repo and htdocs/html folder.