15

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?

Sander Rijken
  • 21,376
  • 3
  • 61
  • 85
Randeep
  • 403
  • 1
  • 4
  • 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 May 18 '11 at 07:01

11 Answers11

5

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.

PeterJCLaw
  • 1,862
  • 1
  • 16
  • 20
  • Thnx for your reply. Yep im fairly new to svn... Well my working copy is pointing to the new location already as I have checked it out from the new location. What I am tryng to do is to move a folder along with all the revisions from one project to another... So like from http://servername/svn/proj1/tags to http://servername/svn/proj2/tags. when I use the svn move command I get the same message which is really puzzling. – Randeep Jan 17 '10 at 21:01
  • OK, from the sounds of it you've actually got two different subversion repos, server/svn/proj1 and server/svn/proj2. If this is the case then as far as I know you're not going to be able to move them across. Have you tried checking out server/svn - unless there's large amounts of content this might be a faster way to move the folder. It would also establish whether or not you have a single repo. – PeterJCLaw Jan 18 '10 at 20:29
  • If you are trying to move a folder between repos then you might find this: http://nileshbansal.blogspot.com/2006/03/moving-folder-across-svn-repositories.html useful. – PeterJCLaw Jan 18 '10 at 20:53
  • Thanks Peter. Looks like I dont have a single repo which is probably why I was unable to perform simple commands like move. I have decided to move the files anyway and for the revisions I will keep the old repos untouched. once again thanks for your reply. – Randeep Feb 01 '10 at 21:55
2

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)

Richard W
  • 21
  • 1
1

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

steve
  • 11
  • 1
0

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

0

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.

user163588
  • 129
  • 1
  • 8
0

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.

Community
  • 1
  • 1
Sander Rijken
  • 21,376
  • 3
  • 61
  • 85
  • Thnx for your reply. Well I have multiple projects in the root folder and I can access them ok. What I am trying to do is to move a folder from one project to another and I dont want to loose the revisions either.. So like from http://servername/svn/proj1/tags to http://servername/svn/proj2/tags. when I use the svn move command I get the same message (repos permanently moved... please relocate) which is really puzzling. – Randeep Jan 17 '10 at 21:04
  • I think /svn/proj1 and /svn/proj2 are two different repositories. Use `svn info` on both URLs to see the repository GUID. If they are different repositories, you cannot move/copy files between them. A file's history is tracked within a single repository – Sander Rijken Jan 18 '10 at 08:53
  • Thanks Sander. The repository UUIDs are different. Looks like I ont have different repos. I have decided to move the files anyway and for the revisions I will keep the old repos untouched. once again thanks for your reply – Randeep Feb 01 '10 at 22:01
0

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

<Location /svn>

not

<Location /svn/>
Stefan
  • 43,293
  • 10
  • 75
  • 117
  • Actually, mine is working with `` to browse the list of projects with `SVNParentPath /path/to/repositories` and `SVNListParentPath on`. But I still get 301 relocated errors from Tortoise SVN clients. – Matt Connolly May 18 '11 at 07:14
0

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.

Eduardo
  • 4,282
  • 2
  • 49
  • 63
0

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

Antoine
  • 23,526
  • 11
  • 88
  • 94
0

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

avp
  • 4,895
  • 4
  • 28
  • 40
0

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