January 22, 2005
Subversion filestat plugin for Pyblosxom
link / comments Pyblosxom uses a file system approach for maintaining blog entries. While this is simple and flexible mechanism it isn't without drawbacks. One common problem is that blog creation dates are determined by the creation time of the file. The correct creation date for the entry is often lost when files are edited, backed up, or moved. Fortunately Pyblosxom's plugin architecture allows plugin developers to override this behavior.Subversion's meta-data is used to determine an entry's creation date. Subversion is a Open Source replacement for CVS. This plugin is recommend for those who are already familiar with Subversion or other source control systems such as CVS.
This plugin deviates as little as possible from the Pyblosxom philosophy. Pyblosxom still retrieves its lists of known entries from the file system. The plugin assumes that those files are committed members of a Subversion working copy.
This plugin works particularly well with a staging server. Entries can be created, edited, and committed on the staging server. The live server is then updated with a simple svn up command.
External Requirements
This plugin requires external OpenSource software not provided with Pyblosxom or this plugin.- Subversion client and server
- Memcached server
- Memcached python client
Unfortunately the performance of the Subversion creation date query prevents it from being used stand alone for dynamic page creations. Memcached is used to cache the creation date results returned by Subversion, which yields acceptable performance of dynamic page creation. Memcached is a general purpose, high performance memory cache originally developed for LiveJournal.com. More information on Memcached is available at their website.
Installation
- Download Memcached server from here, and install according to their instructions.
- Download Memcached python client from here and install according to their instructions.
- Download svnfilestat.py and svnbirthday.py and place them in your pyblosxom plugin directory.
- start local Memcached server with:
memcached -d -m 16 -l 127.0.0.1
note: this must be be running for the plugin to work. You might want to consider
added this command to your startup scripts.
- Install Subversion client and server according to their documentation note: Subversion is now supported on many distributions. For instance it can be easily installed on Fedora 2 & 3 with:
yum install subversion