Running a CVS server on Windows

Last week I started an attempt to convert our work VCS from Microsoft Sourcesafe to CVS.

The first thing to do was get a CVS server up and running. We’re a completely Microsoft office, so no simple “just install linux!” solution for us. Instead we had to install CVSNT, and the last time I tried this (about six months ago) it was impossible. After several attempts by myself and some of the other developers we gave up.

How things change.

The CVSNT I’d tried with before was 1.something, the current version is 2.0.8, and it’s an absolute snap. Within about ten/fifteen minutes of downloading and following the instructions on the installation page of the wiki we were up and running with full internal CVS access using all our favourite clients (emacs, tortoiseCVS, WinCVS, Eclipse).

The next thing to do was port over some of our Sourcesafe projects. For this I used Laine’s VSS2CVS which again was very simple to use, following the instructions given (the only downer being that you need to run it once for every project in the repository, so if you have many projects, this could take a while).

At this stage we had multiple projects checked into CVS which we could check out, edit and check back in, plus all the other CVS functions you’d expect. The problem now was that the author and creation date of each files in CVS were set to the user who did the import and the time the file was imported.

Fortunately, vss2cvs comes with a perl script called “” which takes care of this for you. During the normal vss2cvs process it stores the user history and creation date in the file comment. The massagecomments script restores these values to the CVS repository.

Less fortunately it only works on a single file at a time, and if you’ve just imported a decent number of files then you have a long job ahead of you. I didn’t fancy this, and so brought my insignificant perl skills into play to create “” (if you download it, you’ll have to rename it to have a .pl extension and change the path in the first line which defines which path it should start from) which scans directories recursively searching for files ending in ”,v” and running on them. What can I say? It’s worked for me, running on multiple projects.

What this means is that if you’ve been looking to get away from using Sourcesafe at work, want to stop paying yearly renewals and don’t want to have to buy extra pieces of software to be able to access your code remotely and are having trouble convincing the boss, then give CVSNT a go. It’s a real alternative. We’ve now had it up and running for about a week and a half with daily use (although only light use, I confess) with no problems whatsoever.

Try it, you might like it.

p.s. DeveloperWorks have a good article on sharing code
with Eclipse

p.p.s I should mention of course, that in order to use VSS2CVS you’ll need both Perl and something like MinSys installed (or any other program that provides you with rm.exe and mv.exe, Cygwin will probably do the job), both of which we had installed already.

It’s not often I scroll to the bottom of my blog, but if you do so you’ll spot exactly what I did – Google ads. I wouldn’t mind if I’d chosen them to be there, but I didn’t. I suppose it’s a small plus that they seem to actually have some relation to my blog, but still this is yet another reason why I really need to get my arse into gear and move everything over to Minty running on (which is all just demo layout at the mo).

et voila. another <noscript> tag and they disappear. Exactly the same technique I use to stop Tripod Popups appearing. It makes my HTML completely invalid, but who’s counting? 😉

GenJar is an incredibly useful tool for people like me, who uses masses of libraries during development, chopping and changing between different toolkits and not removing the jars no longer used.

In fact it does more than that, recursively examining the class files used by your app so that your final JAR only includes the classes you actually use!

Looks like good stuff for keeping your total deployment size down.

Is it just me or is this Ben and Mena?

Getting back to the geekiness…

As you might by now know, I’d run my life via Jabber if I could. I subscribe to RSS feeds via Jabber and have a distributed todo list in Jabber (code release soon). My bugtracker sends Jabber notifications if you specify an address, and it’s my preferred IM protocol (FYI I use Psi as my client).

[aside: the new Psi Bugtracker is very very cute and I’m sure it’ll give me, er, “inspiration” for new features. It would probably rank quite highly on my previous bugtracker review, if it was a) open source and b) allowed normal users to add things. Looks fully-featured though.]

Anyway, Harness the power of log4j with Jabber is an article from IBM Developerworks explaining how to do exactly what it says on the tin. Potentially very useful for catching critical errors and instantly notifying a developer/support person. This is definitely getting integrated into my code.

Today also sees two methods of doing the same thing: finding which JAR file a class is in. Norman Richards uses a shell script whereas the IDE folks he mocks can now actually use the Eclipse JAR Class Finder plugin.

Keeping to the Eclipse theme, I know it’s massively popular, and clearly very powerful, but I think I find it too powerful. I use Editplus for all my needs, and it seems to do perfectly well. Eclipse just confuses me with its perspectives and workspaces and completely idiosyncratic method of working with projects. Although, in the process of moving our SourceSafe repository over to CVS this week (using the very good, and very simple vss2cvs), I discovered it has excellent CVS integration. Really, really good stuff. Much better than Visual Studio which kept corrupting our SourceSafe repository (or so I’m told), and it might not be as comprehensive, but far better than WinCVS which has so many usability issues I don’t even know where to start (again FYI, as if you care, I use TortoiseCVS for all my CVS needs).

Incidentally, IBM Alphaworks has lots of RSS feeds, which I didn’t know before. Go look and subscribe.