Calendar:WebDAV testing harness

From MozillaWiki
Jump to: navigation, search

I recently wanted to start using the largely-rewritten Calendar backend code for my real live data. I wanted to be sure that if the not-yet-well-tested code munged my data in any way, that I would have backups, and that I'd actually notice this when it happened.

To do this, I installed Subversion 1.2.1 and the mod_dav_svn that it includes to work with Apache 2.0. After turning on a cool feature called autoversioning, every PUT of an ICS done by Sunbird or Lightning causes that version to be automagically checked into the Subversion repository. So this takes care of the backups piece.

Then, after a bit of searching, I found SubveRSSed. This is a python script that generates an RSS feed, optionally with diffs, when run from a Subversion post-commit hook. Worth noting is that the version of EaseXML that this script depends on is currently only available (as of this writing) by checking it out from its Subversion repository; the pre-made tarballs are all too old.

The post-commit hook is a script which contains only the following command:

/usr/bin/python /usr/local/bin/subverssed.py --svnlook=/opt/local/bin/svnlook \
    /usr/local/repos/auto -d -o /usr/local/repos/auto/feed

So now my favorite RSS reader (Forumzilla, glad you asked :-) keeps me up-to-date with the diffs of each ICS file change that Sunbird/Lightning makes on my behalf.