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.

4 comments:

David Dossot said...

To be fair with Subversion, part of the issues I am experience might be caused by the Eclipse plug-in I am using (Subclipse). Still, this is very annoying!

zepag said...

I agree that Subclipse (same thing for Subversive) is sometimes a complete mess.

Though, one should name Foo's interface IFoo in order to completely avoid ambiguity ;).

Cheers.

Perrine said...

Hum, is it time to write a new SCM ?

As a lot of tools, it must be used with some 'exploitation' rules that strongly interract with our human working way.

And when you add an abstract level between the SCM and another tool used by an ... human, be prepared to expect side effects.

David Dossot said...

@ZePag: IHearYou but IStickToLocalStandards ;-)

@Perrine: I reckon the issues I am experimenting are mostly due to SVN clients not following the "exploitation" rules of the repository.