Since I'm thinking of moving from SVN to a distributed version control system, the first thing I need to do is to try to convert my current repositories to the other version control systems and the first one I tried was git.
My repositories are local and I access them via file://...
, and apparently the
git-svn
application can't access the repositories that way, so I had the get
the my repositories to work via the svn://
protocol.
To register the svnserve
executable as a windows service we run the following
command (in a command prompt window with administrator rights):
sc create svnserve
binpath= "\"{Path to svnserve.exe}\"
--service -r {Path to your repositories}
--listen-host=mylocal"
displayname= "Subversion Server"
depend= Tcpip
start= auto
Where the "{Path to your repositories}" variable should be the path that contains the repository, not the repository itself, for example if you have three repositories:
you should put "c:\repositories" as the path to your repositories.
You'll notice that I added the --listen-host=mylocal
to svnserve's arguments,
the reason for that is that for some reason you can't access the server using
TortoiseSVN and other tools unless they use a host that's not localhost (I'm not
sure why that is, but that's how this guy solved the problem).
For this to work you have to define the mylocal
host in your hosts file, to do
that just add the line 127.0.0.1 mylocal
to the
C:\Windows\System32\drivers\etc\hosts
file.
Run services.msc
, right click on the "Subversion Server" service and press
"Start".
Open a command prompt and run:
svn info svn://mylocal/{path-to-svn-repository}
If it writes some information about that repository then it works!
Now open the same path in TortoiseSVN's repository browser.