Sunday, August 18, 2013


Please refer subversion manual for details. This is a simple how to do if you are still doing your code management by copying files among peers, please use subversion.
Install subversion

Download the version for your operating system from 
Windows comes with an installer which can be used to install.
Starting subversion

In linux start the subversion using svnserve -d command. In windows it is registered as a service which can be started.
Create a Repository
To store projects in Subversion, first you must create a repository. This must be done to a local drive on a local machine.

svnadmin create /path_to_repository/
Change the path in windows accordingly. If you inspect the directory created, you will find a number of subdirectories. Never work on them directly (except for config file). Use commands provided by subversion to handle your task.
By default subversion uses FSFS and not Berkely database. Keep with the default unless you have a reason to go in the other direction. Keep the default if you do not understand the difference.

It's better to use one of the client tools to handle further tasks. If you are in eclipse there are plugins that can help you out. The popular one is subclipse. See Eclipse Subversion Integration to install it. After installing in eclipse, it will show you a subversion perspective. In the subversion perspective make a connection to the repository.
Create a repository structure. There are again different school of thoughts. If you are dealing with multiple projects each quite separate in nature you might want to go for different repositories itself. If you are dealing with large number of projects related to each than you might want to have single repository and all projects beneath it. Also for each project adopt the convention as prrevalent in the community to have a folder structure like

  • trunk - trunk is used for working code
  • branches - branches are used keeping a parallel line of development
  • tags - tags are used for tags
You can create this directory by using svn add command or to use svn import, if the project is already existing.Subeclipse plugin will provide you better interfaces to handle the task.For basic authentication and authorization look into conf/svnserve.conf

No comments:

Post a Comment