Sep 18

WebSVN installation and customisation

Tag: SubversionGrantus Maximus @ 7:28 pm
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…

Calm theme for WebSVN

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:

apt-get install websvn

As apart of this installation you’ll be asked to configure WebSVN (screens below).

WebSVN configuration screen 1 WebSVN configuration screen 2 WebSVN configuration screen 3

For these three screens:

  1. You need to select your web server for configuration.
  2. You can specific the parent path of your subversion repositories. If you don’t want them all available leave this blank.
  3. 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/");

5 Responses to “WebSVN installation and customisation”

  1. [Subversion] Nettes Theme für WebSVN » Blog Archive » [Subversion] Nettes Theme für WebSVN says:

    [...] hier gefunden. Sieht wirklich nett aus und ich werde das wohl gleich auf unseren SVN Server [...]

  2. programming the web says:

    WebSVN in schön…

    WebSVN hatte ich mir schon vor einer ganzen Weile einmal für die Arbeit angeschaut. Es bietet einen schnellen Browser für Subversion Repositories und muss, im Gegensatz zu Trac, nur einmal aufgesetzt und gewartet werden…
    Auch Syntaxhigh…

  3. QuickLinks vom 20. September bis zum 21. September — instant-thinking.de says:

    [...] WebSVN installation and customisation - Installing the Calm Theme for WebSVN. [...]

  4. Sebastian says:

    As of version 2.0, the Calm Theme is the new default theme of WebSVN, Erik has done a very good job! The new version also includes some bug and security fixes.

  5. Sebastian says:

    Since version 2.0 of WebSVN, the Calm Theme is the new default theme. Erik has done a great job with the new design. WebSVN 2.0 also contains some bug and security fixes, so upgrading is advised.

Leave a Reply