Subversive thoughts on Subversion

Back in March I started sing the Subversion revision control system in anger. The experience was not totally positive, thus the title of this post. I just tried to move a project to Subversion again this week. I reverted back to CVS after a day.

Main Features

Compared to CVS, my usual RCS, Subversion offers some major new features:

Atomic Commits

Commits either all succeed or all fail. This lets you avoid the scramble, trying to avoid breaking the build, when some of the files succeed and some fail.

Every Commit is a Tag

In Subversion, each time you commit, a transaction is performed against the repository and each file and directory gets a new version number.

Binary Files are First Class

Subversion knows about binary files. It can also effectively diff them. No need for -kb when you add them.

Problems

In practically using Subversion I saw many problems that are absent from CVS. I should have wrote this article earlier, because I cannot now recall the exact causes of each. While some of the points raised may be perceived as griping, I am used to CVS which is extremely reliable and mature.

Apache SSL

We got a couple of runaway processes using https to access the repository. Not sure exactly where the problem lay. We dropped back to http, which works well.

In my recent Subversion use, we had about 100MB of binaries. The server was again set up with https, this time with certificate based security. It seemed slow to import them when I set up the module. One of my colleagues waited over an hour for a checkout. After it completed we checked the server for any problems. There were no runaway processes. For some reason it was slow.

What Security? There is no security

After a successful login Subversion stores you password in plain text in the ~/.subversion/auth/ directory. Given that a lot of people (probably stupidly) tend to use the same password, or a small number of passwords, this is very dangerous. If you know someone is using Subversion, you know where there password is. I am not sure why Subersion was designed like this. The defence that the directory is accessible only by the owner, being in their home directory is extremely lame. There is now a switch to turn this off, but the default remains to store in plaintext.

Updates

One developer had a problem where he updated, got a screen full of information about updates but it had not completed. Not sure what the cause of this was. By contrast CVS will always update.

Checksum Error

Under some circumstances, you will get a checksum error. At this point you cannot do anything but delete the file. The circumstances are: abrupt termination of the Subversion client, or a buggy subversion client. IntelliJ Irida, still in development, does this. svn cleanup does not fix the problem.

Subversion gets confused

On about three occasions, Subversion got what I can only call confused. It refused to commit or revert. These situations invariably involved deleting the directory tree in the working copy and doing an update. svn cleanup does not seem to help. Nor does svn revert.

Server Corruption

One file got corrupted on the Subversion server and had to be recreated.

IntelliJ Support

IntelliJ will fully support Subversion in version 5, codenamed Irida. It is useable now for diffs and commit browsing. Do not try to perform any adds or commits however or you will get the dreaded checksum error. Update: The new IntelliJ Irida version of IDEA supports Subversion. Given that they are getting close to release, I decided to check it out. Unfortunately a refactor involving moving files to a new package totally screwed up. Back in CVS it worked fine.

Recommendation

When I originally wrote this post, the number and type of problems we experienced suggest to me that Subversion is not ready for primetime just yet. Three months later, and with my reliance on IntelliJ IDEA, my opinion remains the same.
UpdateI tested IntelliJ 5 last week. It;s Subversion support is now very good. Note that they do not suport the file: protocol for local repositories as yet. Other than that no problems. I think Subversion is now ready for a look.

Alpine Car Stereo + Ipod

Regular readers of my blog might be surprised to learn that I have been running an Apple PowerMac as my primary home desktop for the past two and a half years. I like the digital hub strategy. My wife found the Mac slightly easier to use than our previous machine, a Linux box. (I run Linux on my primary work PC a laptop, and all the servers at home though).
Anyway, accessorising the Mac, we got still and movie cameras. We then bought an Ipod. At home we first plugged the Ipod into our hi fi for playback and later went to an Airport Express with AirTunes.
In the car however we struggled. I toyed with the idea of connecting the Ipod to an auxiliary input on my LandRover Discovery, but then opted for a Belkin FM transmitter. Though I still have it I have only used it a few times. It gives a weak signal, and there is a lot of noise in the sound. Also, it requires batteries. We always managed to leave the unit on and found the batteries the next time we used it.

The Alpine+Ipod Combo

I replaced the stereo in my Landrover with a new Alpine Stereo. This unit can be coupled with an IPod interface, which costs an extra USD100.

The IPod sits in the glovebox and is powered from the interface unit, relieving the need to charge it. You can take your IPod with you when you get out of the car just by disconnecting it. The connector is the same as comes with the standard charger of firewire interface. 9/10

The music quality is excellent. 10/10.

You control the IPod from the Alpine Stereo. It is far less intuitive than using the IPod directly and a bit frustrating. When you turn the volume knob to select, it can take up to 2 minutes of twirling to get through my 15Gb of music. Having a selected an artist I have not figured out how to select an album. 3/10

I think the market is still open for another car stereo vendor to do a better job than Alpine. Still, it is the best solution I am come across so far. If you have the money, you could just by a Ferrari. New Ferrari’s come with their own IPod interface. I hope it is not by Alpine.

Java Webstart with Eclipse Rich Client Platform and Linux

With Linux

I run Fedora Core 3. Something in Fedora Core 3 broke the Java Webstart which ships with JDK1.4.2 and JDK1.5.0. It is not fixed in JDK1.5.0 update 1, but is scheduled to be fixed in update 2.

javaws uses all available cpu and does not exit.

Workaround

A Sun engineer has kindly provided a special release which works. It is attached to the Sun bug. See http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=6195591. I reproduce the excerpt for convenience below.
Get this version of javaws http://www.jbg.f2s.com/javaws-1_2_0_06-linux-i586-i.zip

  1. unzip in a suitable location (not the current java directory)
  2. execute install.sh to install this version of javaws.
  3. Now open a web start link (eg one from here http://java.sun.com/products/javawebstart/demos.html but specify the newly installed javaws as the program to execute rather than the old (not working one) Note, if you have already set the default web start app in FireFox then just go to Edit->Preferences->Downloads and edit the entry for JNLP file types.

With Eclipse Rich Client Platform (RCP)

We, after many days of effort could not get RCP and JNLP to work. There is a open source project out there called webrcp which seeks to get the two working. See http://webrcp.sf.net. It worked perfectly on Linux. It turned out to have a showstopper bug which stopped it working on Linux. We have submitted a bug and patch to the project for those that come after us. With the patch installed, it worked.

First Thoughts on Eclipse Platform

This week I have been part of a team working on an Eclipse Platform application to be launched from JNLP, or Java WebStart, as it is better known. We are using Eclipse 3.0.

Problems

My complaints are as follows:

build.xml is being deleted

Whenever I build my project from the Eclipse IDE it deletes my build.xml. This is happening to each developer. Not sure where this coming from or how to stop it.

Null Pointer Exception

We are developing an eclipse plugin. You export it to a jar. It optionally creates an Ant script, so you can do the same thing in your Ant build. Unfortunately is does not create a taskdef. There is no documentation that my colleague could find in two hours of searching on how to do this. We independently got it half working, both to be stopped by an informative null pointer exception! We ended up looking at what was created and doing it from Ant with Ant built-in commands.

Mac Support?

The Mac support is second class at best. Including the carbon lib in your library path at application start up causes an exception. Including the windows libs on Linux or the Linux libs on Windows does not. On the Mac you cannot start an eclipse app with Java. You need java_swt, which comes with eclipse.

Raw

I understand that 3.0 is the first version of Eclipse designed to easily run plugins outside of the IDE. It shows.

No Documentation

There is very scant documentation of an extremely poor quality. This feels like a backyard doco effort.

The Promise

I had heard lots of good things about Eclipse Platform. Perhaps what we are going through settles down to assumed knowledge after a time. I would welcome any commenters views. We are presently seriously wondering how widely it can be used given the problems we are seeing.