Setup and Configure Subversion Repository Server

I have seen how convenient it is to have your own svn repository. For example, if my code changes broke one of the AJAX features that I am working on, I can easily restore everything to my previous working revision.

If you are not familiar with svn, there is a good free (yes! FREE) book about svn from svnbook.red-bean.com.

I followed Jeff’s tutorial to have my local svn repository (recall that I am using a Mac and it has Subversion by default).

I modified the tutorial a bit to store my repository in my home directory (e.g. /Users/my_user/Projects/svn). In addition to changing the directory creation steps, I also need to change one line in the svn.conf file:

SVNParentPath /Users/my_user/Projects/svn

Everything works great so far! :)

I created a repository for my Ruby-on-Rails projects in localhost/svn/rails.

To list my repository:

svn list http://my_user_name@localhost/svn/rails

Obviously, change my_user_name with the user name that you define in Jeff’s tutorial and change the path to you repository path.

You can also add as many repositories as you want. For example:
- By programming language: localhost/svn/java, localhost/svn/dotnet.
- By projects: localhost/svn/depot.
- By version: localhost/svn/2007 or localhost/svn/summer2005.

To initially import a project:

cd /path_to_your_project
svn import -m “Initial project import” . http://my_user_name@localhost/svn/rails/project_name

Yep! You need to have the dot before the http://….

Note that svn can be used for any type of documents including Word or Excel documents!

Have fun with svn! I am sure you will find it worth your time to install it.

Post a comment if you have any questions and I will try to answer them as much as I can.

Leave a Reply