Nov
8
2008
WebSVN is an amazing PHP based interface in to your subversion repositories. Consider it a glossy online GUI to your code! This is a basic tutorial to set it up on your web server…

I should note in advance that I use Dreamhost as my hosting provider, so you’ll need to double check your exact configuration for yourself… Also I am about to install WebSVN 2.0…
- Use your favourite SVN client to check out http://websvn.tigris.org/svn/websvn/tags/2.0/. (username: guest, no password).
- Rename the file ./includes/distconfig.php to ./includes/config.php
- Open your config.php and make at least the following changes:
$config->setSVNCommandPath('/usr/bin/');
$config->setDiffPath('/usr/bin/');
and
$config->parentPath('/home/username/svn/');
- Lastly copy the files to a directory under your website
Now you’ve got a great online subversion browser… But this doesn’t have any user restriction yet, more on this soon ;)
4 comments | tags: Dreamhost, Subversion, SVN, WebSVN | posted in Dreamhost, Subversion, Version control
Sep
18
2007
Updated 10 Nov 2008:There is now an easier article (Setting up WebSVN on Dreamhost) with out jumping in to the console! It’s simpler and suitable for people without console access.
WebSVN is a PHP based web interface to your Subversion
repositories. Its official description is:
WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. 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 the differences between 2 versions of a file so as to see exactly what was changed in a particular revision.
You can also use custom templates with it! While the standard on is functional, I’ve chosen to setup the Calm Theme for WebSVN. As you see below its far more than just functional… beautiful even…

WebSVN installation
I’m using Ubuntu as my server but hopefully your distribution has WebSVN available in their repositories as well. You may just have to look for instructions more suited to your distribution! To install:
As apart of this installation you’ll be asked to configure WebSVN (screens below).

For these three screens:
- You need to select your web server for configuration.
- You can specific the parent path of your subversion repositories. If you don’t want them all available leave this blank.
- You can specific the individual repositories separated by a comma instead of specifying the parent folder. Otherwise leave this blank.
I’m using Apache 2 and I decided to make my repositories all available so I entered /var/svn on the first screen (the default folder for most people is /var/lib/svn). This can be modified later in /etc/websvn/svn_deb_conf.inc.
The rest of the installation was simple for me! By default the WebSVN places the application in /var/www/websvn/ and Apache is already serving /var/www/ for me.
All I did was add the same authentication as my /svn/ directory by adding the following in to the apache config.
<location /websvn>
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</location>
Calm theme setup
Use wget to download then gunzip and tar to explode the files. You can get the theme from the Calm Theme for WebSVN web page. Then copy the template in to the WebSVN directory:
mv calm-theme-for-websvn/ /var/www/websvn/templates/calm-theme-for-websvn
Then to setup the location of the template you want WebSVN to use. Open /etc/websvn/config.inc changing:
$config->setTemplatePath("$locwebsvnreal/templates/Standard/");
to
$config->setTemplatePath("$locwebsvnreal/template/calm-theme-for-websvn/");
6 comments | tags: ubuntu, WebSVN | posted in Subversion