Skip to content


Subversion and WebDAV

Apart from this blog I wanted to integrate other content for future reference, preferably under source code control. In keeping with the theme "do the simplest thing possible" I decided to go with configuring apache with a webdav location backed by an subversion repository.

It seems really ironic to me that the "V" in WebDAV is optional, but that's the way it is. It does mean you can have your DAV location backed by a file system and only one version.

Get subversion installed with ssl support:
./configure --with-ssl so it will build neon as well. This is important if you want your svn client to access your server via https://myserver.com/svn.

Follow the subversion documentation or checkout the subversion book to create a repository add a test file, and make sure all that is working before doing the httpd integration.

When you follow the svn httpd setup one thing that tripped me up in setting up the config was turning AutoVersioning option function, in the books example they have config for the mod_dav_fs not mod_dav_svn.

DAV svn
SVNPath /fullpath
SVNAutoversioning on
...

And if that worked you should have no problems viewing one of the files in your repository, via http://myserver.com/svn/index.html

Back at the start of this blog I wanted to setup some versioned docs that I could access over the net, but chances are that if you browse to that location you will only get the plain text version of the file.

WebDAV supports meta data about files, called Properties, which is exactly how mime-type's are treated, so by doing something like this svn propset svn:mime-type text/html index.html.

You only need to add it manually if the svn client you used to add the file had "auto-props" option set to "no", which is the default.

Now that that is up and running, you can get your life in order with sunbird
and keep versioned remote calendars on your server. Creating a remote calendar is pretty straight forward, although the screenshots from that link didn't match with the current build, I couldn't import, since the authentication option was not provided in the gui, so I had to add the local file directly with svn then subscribe to it.

I went straight for setting up https over the other types of secure options subversion supports. You might also want to checkout the "LimitExcept" options for creating a anonymous read but write protected repository.

There are some other common tools available for WebDAV like cadaver, but since i'm only interested in dav locations backed by svn, the svn client is the only cli tool I'll need.

You could try out the litmus test to see how good the support is, although be warned, subversion does not yet fully support the WebDAV protocol.

Post to Twitter Tweet This Post

Posted in Web. Tagged with .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.


Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.