views:

5070

answers:

7

I am trying to setup an SVN for the first time, I chose tortoiseSVN because my IDE phpdesigner has built in support for tortoisesvn.

SO far I have installed the program, installed it and tried to set it up following many tutorials and reading the help file I still get this error no matter what I try to do, I even searched SO and google for this same error and I found many results, I was unsuccessful in finding a solution though, does anyone have any ideas, this is very frustraing, maybe I was meant to never use SVN

Import C:\webserver\htdocs\cache to file:///C:/webserver/SVMRepository
Error : Unable to open an ra_local session to URL
Error : Unable to open repository 'file:///C:/webserver/SVMRepository'

I have tried things like this in the browser svn://C:/webserver/SVMRepository and all it does is open up the tortouse repository browser and then says "Unknown hostname C"

A: 

-- edit: Advice only good if your SVN server is on another machine

That url is not your repository.

Your repo is something like:

http://webserver/project

You can actually just browse directly to it, depending on how it's configured (but if it's configured with apache, this should be possible).

Who set up your svn server? You?

Noon Silk
Folks, if you downvote, give a reason!Silky, he's using ra_local, so file:///C:/... is valid URL.
Si
Cheers Si, I'm not familiar with people actually running a repo completely locally like that. My mistake.
Noon Silk
np Silky, ra_local is rare and not normally recommended. I'll upvote you out of dislike of downvoters who don't give a reason :)
Si
+3  A: 

TortoiseSVN works perfectly fine for me on Windows 7, didn't have to do anything to make it work - just installed out of the box and been running fine ever since.

Chances are there is actually something up with your SVN repo. Try entering c:\webserver\SVMRepository instead (if the repo is actually on your local machine).

Otherwise, I would suggest using a simplified SVN server like VisualSVN for Windows, which does make life a lot easier, even for experienced developers.

Fritz H
+1 for VisualSVN server, it's afaik the easiest way to set up a non-local (ie. simple file-based) Subversion repository on Windows.
Lasse V. Karlsen
c:\webserver\SVMRepository is not actualy a web directory, so i moved and tried this c:\webserver\htdocs\SVMRepository and it seems to work, all my projects files are in the htdocs folder though so will that be a problem with svn?
jasondavis
I got it working now, weird I thought that SVN copied files over to the repo, like actual file, when I go to the repo in a windows browser it is empty, but when I look in the svn browser it shows my files
jasondavis
+2  A: 

A couple of questions:

  • Is there actually a repository in C:\Webserver\SVMRepository? (can you verify that the directory contains subdirectories like conf, db, hooks, locks?)
  • Which command are you trying to execute in TortoiseSVN?

Also, note, I use TortoiseSVN on Windows 7, and it works exactly like expected.

Note that I get exactly the type of error message when I try to use a repository directory that doesn't contain a repository.

Ie. I simply created C:\Temp\svn, did nothing to it, then tried to import another directory using file:///c:/temp/svn as the repository url, and got this:

Import C:\Temp\dddd to file:///c:/temp/svn
Unable to open an ra_local session to URL
Unable to open repository 'file:///C:/temp/svn'
Lasse V. Karlsen
C:\Webserver\SVMRepository does have all those directory inside from using "build repository here". As for using it I am trying to do anything right now as I have no file in it yet but I cannot use the svn browser because it give the errorsa that are in my question above, i would love to get tortouse to work but i'm stuck
jasondavis
Are you using the graphical import command or the command line import command? ie. are you right-clicking on a directory (c:\webserver\htdocs\cache) and picking the Import command, or are you issuing this command: svn import ..... ?
Lasse V. Karlsen
I tried both methods, I just now moved my SVN directory inside of my web directory htdocs/ and now the svn browser is working
jasondavis
A: 

How are you importing the Repo? using the GUI or command line.

Can you try from command line?

$svn import ./sourcetree file:///C:/webserver/SVMRepository -m "initial import"

Umesh
A: 

I have to mention this: is it possibly that you are typing SVMRepository when you really mean to type SVNRepository? I only suggest this because it is there in two places in your question (and I have myself wasted hours on problems caused by my own typos).

Zac Thompson
(:snap:) wait till you hit the Windows case-sensitive issue where you're allowed to checkout a working copy with the URL having the wrong case, but you're not allowed to commit that working copy...that took me *ages* to figure out :D
Si
FYI: http://stackoverflow.com/questions/634498/problems-commiting-deleted-directory-to-svn-repository Correct answer learnt the hard way still gets no votes! :)
Si
+1  A: 

Since you're using ra_local, my guess would be a permissions issue.

Did you create the repository with the same user that is now accessing it?

Also, any chance it's just a simple typo in the URL: SV**M**Repository

Si
A: 

Could it maybe be a simple typo on your part?

file:///C:/webserver/SVMRepository

seems wrong, I'd suspect you meant

file:///C:/webserver/SVNRepository

? (the SV**N** instead of SV**M**).

Stefan