views:

1566

answers:

2

I was just checking out git-svn and thought I would give it a try with one of my existing repository. When I ran git-svn I got this error.

Couldn't open a repository: Unable to open an ra_local session to URL: Unable to open repository '{MyFilePath}': Expected FS format '2'; found format '3' at C:/Program Files/Git/bin/git-svn line 1358

I ran a version check on git-svn that I am using and it printed out:

git-svn version 1.5.5.1015.g9d258 (svn 1.4.6)

I noticed that it's using svn version 1.4.6 but I created the repositry using TortoiseSVN with Svn version Subversion 1.5.1.

My main question is how do I update git-svn so that it will use 1.5?

+6  A: 

If you access your Subversion repository using a network protocol (such as svn://) instead of local file access, then things should work properly for you. It appears as though you're asking git-svn to access the repository directly, causing the problem you've shown. The Subversion network protocols are more resilient to older clients connecting.

Greg Hewgill
now I'm getting a "Connection refused: Can't connect to host '': Connection refused at" error. Any ideas what would be could causing that.
Nathan W
In order to connect with the svn:// protocol, you will need an instance of svnserve running on port 3690 (default). See http://svnbook.red-bean.com/en/1.0/ch06s03.html for more information about setting up svnserve.
Greg Hewgill
Thanks heaps Greg :)
Nathan W
To answer your next question before you need to ask, you will also need to set up the "passwd" and "svnserve.conf" files in the conf/ subdirectory of your repository with appropriate access credentials before you will be able to commit anything with git-svn. The svnserve daemon by default allows anonymous read-only access, with credentials required for write. You may alternately set up "anon-access = write" in svnserve.conf if your machine is on a private network (ie. nobody else can connect to it).
Greg Hewgill
Cool thanks for the help, setting it up now. I managed to get it to pull down the files but I didn't try and commit it so I didn't run into that issue, so thanks for the heads up.
Nathan W
A: 

Your git version is pretty old, too. Especially on windows (which is what you are using it seems), there have been a lot of fixes since then. I would try updating git first.

David Cournapeau
I am running 1.6.3.msysgit.0 which still has svn 1.4.6 so you need to have svnserve running.
Tanj