Friday, March 21, 2008

SVN

I'm using the Subversion source control system with my Java project, in Eclipse, with a plugin to interact with the Subversion server, over on a Sun Linux box.

Subversion (SVN) includes a macro system enabled by setting properties 'on' which will fill into a string in my source code versioning info, like username, date and version number, when I file is commited. The application can of course then use this string to print out info about itself. Handy.

The macros are things like "$Rev$" which gets turned into something like "$41$". It has a macro for the author, doing the commit, the date and one or two others.

I also have a class which can walk the classpath and pull these strings, by a name I designate, out of any class file and thus collect up a complete version summary of everything in the app. There's hundreds of modules, so this is handy!

Great! All this works perfectly!

Opps!! The world is using WINDOWS!!!!
Since I went to the trouble to setup SVN to authenticate against the Windows domain (since it's OPEN software, you can do things like that), and now my "username" is now "here\username".

That's a backslash. Unescaped. And now "here\username" is an invalid string in pretty much any programming language in the universe (no doubt MSFT has broken the specs on some languages to allow this, sometimes, er, maybe, er something).

Windows, where \ and / are the same, or not, sometimes, where a space is a normal charater or not, sometimes, where case doesn't matter, or does, sometimes, where cut'n'paste always works, except where it doesn't, where a file "extension" is a magical part of the, except when it isn't...

No comments:

ShareThis