WebSVN : A lightweight subversion repository browser

Advertisement

WebSVN is a lightweight subversion repository browser which is free and comes as a Debian Package too. Written in PHP, it is very portable and easy to install. We wrote about SVN or Apache Subversion before in an previous article, this is about a subversion repository browser.

Brief Details and Dependencies of WebSVN

Full root / super user access on Server, PHP, Apache Subversion and other dependencies are required to run WebSVN. One can use Debian or Ubuntu as Server OS for this purpose of using WebSVN. WebSVN basically offers an online browser based way to view the subversion repositories. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. You can also view compare two versions of a file so as to see exactly what was changed in a particular revision. The official website is here :

Vim

1

http://www.websvn.info/

Installation of WebSVN

The Debian Package of WebSVN can be found here :

Vim

1

http://packages.debian.org/search?keywords=websvn

We previously described how to install SubVersion. But we have described here in details too. Obviously you can install PHP and normally required components. The most recent version of WebSVN can be configured in your subversion domain with no issues. No extra config is necessary for the syntax highlighting which was essential before. Simply download the tarball into whereever you want, extract it, then copy the distconfig.php to config.php. Edit the config.php and that is pretty much it. As basically for Debian it is a package, we can install as package too. I have used my name (abhishek) to use as an user. Do not copy that / change it.

Advertisement

---

Vim

1

2

3

4

5

6

7

8

9

sudo apt-get install subversion

sudo mkdir/home/svn/

sudo svnadmin create--fs-type fsfs/home/svn/abhishek

sudo groupadd subversion

sudo addgroup abhishek subversion

sudo chown-Rwww-data:subversion/home/svn/*

sudo chmod-R770/home/svn/*

sudo htpasswd-c/etc/apache2/dav_svn.passwd abhishek

vi/etc/apache2/dav_svn.authz

Example file :

[groups]abhishek_devs=abhishek

#[/]#*=

[abhishek:/]@abhishek_devs=rw

Vim

1

2

3

apt-get update

apt-get upgrade

sudo apt-get install websvn

Restart the server :

Vim

1

service httpd restart

Add Alias :

Vim

1

Alias/websvn/usr/share/websvn

Your /etc/apache2/sites-enabled/000-default should look like this :

Vim

1

2

3

4

5

6

7

8

9

10

DirectoryIndex index.php

Options FollowSymLinks

Order allow,deny

Allow from all

AuthType Basic

AuthName"Subversion Repository"

Require valid-user

AuthUserFile/etc/apache2/dav_svn.passwd

php_flag magic_quotes_gpc Off

php_flag track_vars On

Restart :

Vim

1

sudo apache2ctl restart

/etc/websvn/svn_deb_conf.inc file can be edited for pretty looking. This is very secured good installation, you can use more users in the same way. Just you must keep the Group Permission rightly. Otherwise, other user can write / edit your file.