Thursday, January 03, 2008

Sub My Version

We all love Subversion: it is a solid, simple and powerful SCM that is as free as beer on a Super Bowl day. But when Subversion starts throwing a tantrum, the sense of free fall that occurs is really discomforting, to put it mildly.

I know how to find my way out of most of the problems (twiddling the .svn folder usually does the trick), but it is not always enough and not all issues can be solved locally (at least by reasonably educated developers). Indeed, the thing I hate above all is when I need to break the build in order to solve a Subversion issue: when the local files are in such a painful state that a commit followed by an update is needed, crap will happen in the CI server.

Take this simple case for example: extracting an interface of the same name as the source class, while renaming that class. I always do it in the wrong order:
  1. Rename the class (say Foo to FooImpl),
  2. Extract interface (Foo out of FooImpl),
  3. Bang! Subversion wants to delete Foo from the repository (from step 1) and add a new version of it (from step 2).
Why do I have to care about SCM when performing such a trivial operation? Read Larry O'Brien suggestion about this.