Updated History Flow Subversion plugin

Back in 2006, I wrote a Subversion plugin for History Flow, a visualisation tool that lets you examine graphically the history of a text file. (I also wrote about the API that History Flow uses.)

Unfortunately the plugin had stopped working, and JavaSVN (which I used to access Subversion repositories from Java) had been renamed to SVNKit.

I originally provided a ready-to-run plugin JAR, plus a ZIP containing the source code. Today I found the old Subversion repository that I used when originally writing the plugin.

So I’ve converted the Subversion repository to a git repository, and you can find all the code – with fixes to get it using SVNKit instead of JavaSVN – in the historyflow-subversion repository on GitHub.

In doing this I’ve learnt a few things about writing good commit messages and converting from Subversion to git.


Posted in Uncategorized | Tagged , , | 2 Comments

Chainloading from one grub to another

If you install two (or more) Linux distributions on one machine, then by default they both install grub to the master boot record (MBR). The second distribution’s grub menu therefore overwrites the first.

For example, on my laptop, I have Windows on /dev/sda2, Fedora 8 on /dev/sda5 and Debian 4.0 (etch) on /dev/sda7. Having installed them in that order, I ended up with Debian’s grub menu, allowing me to boot into Debian or Windows.

It’s tempting to copy all the Fedora grub entries into Debian’s grub menu file to regain access to Fedora, but if the Fedora kernel gets updated, you have to manually update the Debian grub menu file to include the new Fedora entries. Fortunately, there is a better way: have two grub installations, and allow them to chainload each other.

Continue reading

Posted in Uncategorized | Tagged | 3 Comments

Booting the Fedora installer with PXE

Launching the Fedora installer over the network, as well as having a local mirror of the Fedora repository, means you don’t need to burn a CD or DVD. It’s a convenient way of trying out a new distro.

I’ve done this for Fedora 8. I have a local Fedora repository on my Fedora 7 gateway. You need a working DHCP server, which I won’t cover here. To get the network boot working I did this:

  1. install tftp-server. Ensure it’s enabled (chkconfig tftp-server on).
  2. install syslinux. Copy /usr/lib/syslinux/pxelinux.0 into /tftpboot.
  3. create the directory /tftpboot/fedora8 and copy the contents of Fedora/i386/os/images/pxeboot into it.
  4. create the directory /tftpboot/pxelinux.cfg and put this default file in that directory.
  5. add the following options to your dhcpd.conf (change 111.222.333.444 to your server’s IP address):
    next-server 111.222.333.444;
    filename "pxelinux.0";

If you boot the client machine, it should automatically boot the Fedora installer.

Posted in Uncategorized | Tagged , | Leave a comment

Building pssh using Cygwin

This is how I build pssh on Windows XP, using Cygwin and prc-tools.

Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Pre-queue content-filter connection overload

Ever since updating my gateway to Fedora 7, I’ve been getting messages like this in my daily Logwatch:

84   *Warning: Pre-queue content-filter connection overload

Worrying that I might be losing mail, I looked at the logwatch script for postfix in /usr/share/logwatch/scripts/services/postfix, and discovered that this message refers to lost connections from clients whose IP addresses are unknown – in other words, entries in the postfix log that look like this:

Aug 24 19:44:17 gateway postfix/smtpd[29089]: lost connection after CONNECT from unknown[unknown]

This happens when postfix doesn’t know the IP address of the client, probably because the client is “disconnecting” before the connection to postfix is properly established.

Posted in Uncategorized | Tagged , , | 7 Comments

Making the brightness keys work on a VAIO VGN-FE31H

After installing Windows XP on the VGN-FE31H, the screen brightness keys (Fn-F5 and Fn-F6) no longer work. To make them work again you need to install some of the utilities that ship with the laptop, which are also available in the FE3_Utilities.zip download from the Sony web site.

Continue reading

Posted in Uncategorized | Tagged , | 2 Comments

Passing reference data to the success view

When using Spring’s SimpleFormController, the default behaviour is to pass reference data to the form view, but not to the success view. However it’s very easy to override this behaviour, and access the reference data from the success view as well.

To do this, override the 4-argument onSubmit method like this:

protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
    ModelAndView mav = onSubmit(command, errors);
    Map refData = referenceData(request, command, errors);
    return mav;

If you’ve only implemented the 1-argument referenceData method, don’t worry; the default 3-argument referenceData just delegates to the 1-argument method, so your implementation will be called.

If you’re interested, you can see the code for SimpleFormController.

Posted in Uncategorized | Tagged , | 2 Comments