Search This Blog

Thursday, October 22, 2009

Web SVN Repository Browser

The need for a Source Control System in a development environment often increases but they are not just the Versioning system they need to do more...

A developer using SVN has many options with his IDE to work with SVN like diff between revisions, comparing and browsing histories etc., but will the IDE fill the complete usage requirement of the SVN?

How about a config manager or a project manager looking into the code base to get some information, do they need to check out the code and use IDE?

Our previous USVN gave few options to browse through the code but it supports only the view for latest version. In the scenarios like this we often require more tools to do this.

Now we are about to explore the WebSVN a tool to browse the repository at different revisions, get a RSS feed intimation when a new checkin happens, also to tar and archive the repository from the branch we need.

Lets look into it.

WebSVN is provided by Tigris the famous SVN tool provider.

What do we need to install WebSVN?
1. PHP Hosted Server ( I prefer a Fedora Linux as it could install all dependencies)
2. PECL and PEAR support to install few modules required by PHP
3. SVN

Installing WebSVN
Login as root or use sudo to perform yum installation

#yum install websvn

It installs all dependencies with WebSVN.

Making WebSVN accessible for external world.

Make the installed directory of WebSVN a sub directory in the existing web server.
#ln -s /usr/share/websvn /var/www/html

Edit the config.php

add the following line before the LOOK AND FEEL Section in the config file.

$config->addRepository('NameToDisplay', 'URL (e.g. http://path/to/rep)', 'group', 'username', 'password');

For Example
$config->addRepository('HR App', 'http://svnserver.local/repository/hrm/', NULL, 'admin', 'admin');

Access the website matching the path we could see WebSVN working as below.



We can add more projects/repositories by adding similar config lines as explained above. The details of the project will look as shown below.


The RSS Feeds can be subscribed and the new check-in and repository changes can be accessed via RSS updates.

The WebSVN also alows to make tar and download repositories by changing more configuration in the config.php.


The WebSVN solves problems like version comparison, change notifications and more.

To conclude its a good utilility for SVN, with few drawbacks.
1. The repository addtion requires config file change - Better if we could do in front end.
2. Has no authentication system so if a repository is added every one who has access to the WebSVN can see all repositories.

Soon we will look into more tools similar to this.

No comments: