Bazaar Development

Inspired — again — by Sam Ruby, I have begun using Bazaar for source control. My first use case was creating a branch of Venus to implement a cache expunge mechanism. Also, I think Bazaar hits a sweet spot regarding ease of use for personal as well as distributed development, and once the prerequisites are in place, it’s easy to set up.

While doing that I learned some more about Python, and found out I wanted to be able to subscribe to the changes in a Bazaar branch.

Starting out with Sam’s tarify.cgi and Joe Gregorio’s sparklines as working examples I have managed to create a simple Python-script for generating an Atom feed: bzr-feed. You can of course subscribe to the changes!

On the TODO is creating RDF output with DOAP, but I think I might need to figure out a way to store and report more information than is currently available in the Bazaar repository.

To use bzr-feed, you will need something like the following in the .htaccess file in the directory containing the branches:

<FilesMatch ".*\\.cgi">
Options ExecCGI
AddHandler cgi-script .cgi
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule (.*).atom$ bzr-feed.cgi?dir=$1

As a bonus, while working on bzr-feed, I realized that Apache apparently supports If-Modified-Since out of the box for CGI scripts as long as the Last-Modified header is sent (though ETag support still needs to be implemented separately). Nice.

3 thoughts on “Bazaar Development

  1. I made a couple of small changes to bzr-feed. You can find them here.

    1) You go to unnecessary (and, in my case, malfunctioning) lengths to generate the URL for <link re='self'>. Simplfied.

    2) I added the commit-log entry to the <content> of the entry, as it is frequently too long to be legible as the title.

Comments are closed.