I've been spending some time studying a tool for looking at the structure of code bases. After having tried out some of the more basic possibilities I wanted to go for the finer points and study changes between two versions of code to see what effect my changes made. This is where I realise that I would like to have a local Subversion repository not only for this, but also for how it would benefit some of my hobby projects. After some googling I found my way to http://subversion.tigris.org/project_packages.html where, since I'm on windows, I picked the windows path. I end up downloading the latest version of Subversion: http://subversion.tigris.org/files/documents/15/45344/svn-win32-1.6.0.zip
I unpack it in "C:\Program Files\Subversion". To get the commands to work you have to add the bin to your path. In my case I add "C:\Program Files\Subversion\svn-win32-1.5.6\bin" to the path. After this I open up a command window and do the following:
mkdir subversionRepository
cd subversionRepository
svnadmin create project1
Now, in order to make Subversion work in Eclipse I add http://subclipse.tigris.org/update_1.6.x to my update sites. After downloading this I restart my Eclipse and go to Window -> Show View ->Other->SVN -> SVN Repositories.
I right click in the opened view and create a new repository location. Instead of writing a http adress in the URL window I now type "file:///C:/subversionRepository/project1". Notice the three forward slashes after "file:".
I now have an empty repository that I want to put my project into so I right click on the repository and add a new remote folder that I call trunk. Right clicking on the trunk I can now import my project by importing the folder that contains the .project file. I hit F5 to refresh the view and can see that the trunk is now filled with my first version of my project.
But I also have to associate the repository version with Eclipse, so now I right click in the Package Explorer and choose Import -> SVN -> Checkout Projects from SVN. I pick my previously created repository, click next, mark the trunk and then click finish. I get a question if I want to overwrite my previously created project with the same name and say ok. I won't need that now that I got a versioning system!
I can now finally continue my studies of the tool I was looking into.
Rickard Nilsson
Consultant at Jayway

13 comments ↓
This was a great writeup on the very thing I was looking to do, thank you for the great help.
Great. Short and to the point. Saved me from thrashing around.
Thanks!
Thanks, man. Just what I was looking for…!
Yeah. Thanks, it was quite helpful.
thanks for the quick and easy svn / subclipse setup tip, especially useful b/c you described how to do it from existing project source.
now my eclipse project source is snugly and safely version controlled.
Why can’t life always be as simple as this…? thank you!
This was exactly what I was looking for. Thanks a lot.
Thanks for this useful article. This should be put on subclipse website. Thank you.
Just to say Thank You!
Also I want to add something, It’s not neccesary to install Subversion, if you install TortoiseSVN you can make the repository with it and it will work too.
Thanks A lot for your helpful tip , but when i was searching for the local svn server , i found another easy way… there is a software called Visual svn you can create local ripositories and managed them with an easy and efficiant way !
Downalod link here : http://www.visualsvn.com
Now you have a local SVN setup, how do I share his with people I want to work with?
thanks for sharing , looking for this from long time
Great article! Thank you very much!
Leave a Comment