Archive for the ‘Version control systems (VCS)’ Category

Switching to Mercurial

So I’m trying out Mercurial.

The reason is that it is now integrated into FogBugz through Kiln – a new FogCreek Software as a Service software offering, which seems pretty amazing.

The first Mercurial resource I found particularly helpful was Martin Geisler’s article here:  This is a very short article that outlines the basics in “6 steps”.

The other resource that was really helpful was Joel Spolsky’s excellent Mercurial tutorial here:  As usual, Joel’s writing style is funny and informative.  His “Subversion Re-education” is particularly enlightening, and I completely agree with his statement that:

…here’s how Subversion works:  When you check new code in, everybody else gets it.

[So] Subversion team members often go days or weeks without checking anything in. In Subversion teams, newbies are terrified of checking any code in, for fear of breaking the build…

I have two machines, and I program on both simultaneously.  (It takes about 3 minutes to build the application and run all the unit tests, so I will switch over to the other computer and program on it while I’m waiting for the unit test results.)

Even with only two computers and one programmer this “feature” of Subversion has been really affecting and frustrating me lately.  I really want a source code repository where I can check-in temporary code to help “snapshot” it, even if it is not completely ready for the main “trunk”.  Subversion doesn’t  have that without using branches (which are scary in Subversion) – but Mercurial (and any DVCS) does provide this wonderful feature and it’s not scary at all.

Both of these articles have helped changed the way I think about version control, or at least helped to start changing my thinking.

The good folks at FogCreek have also been kind enough to answer a few questions, and the website is full of Mercurial questions and answers as well.  My first question was asking about how to handle large projects and shared utility libraries:


TortoiseHg now works wonderfully on Vista x64 – it didn’t when I first looked at Mercurial.  It’s not quite as “pretty” as TortoiseSVN visually, but it gets the job done and seems more functional.

I have found two plug-ins for Visual Studio 2008 and 2010:

I installed the HgSccPackage, because StackExchange had good things to say about it, and it seems to do the trick nicely.  When I add a new class in VS2010 it automatically adds it to the Mercurial repository, just like you’d expect. So far, so good!


Switching to PlasticSCM & Dealing with Subversion corruption

So I’m switching over to PlasticSCM, and I’m trying to import my existing SubVersion repository.

The PlasticSCM importer was easy enough to configure, and at first I pointed it against the VisualSvn Server bin directory.  That didn’t work very well, and I immediately got a null-pointer exception.

So I downloaded the latest Windows binaries from

That worked better, but after a little while the import said that there was an error.  At first I thought it was a problem with PlasticSCM, but it wasn’t.  The PlasticSCM importer reported that there was a problem running the command:

svn log -v https://myserver/myproject

So I ran this command from the command line and eventually got this error back from Subversion:

Could not read chunk Size: Secure connection truncated

So after some Googling demonstrated that other people had this problem and nobody had a solution I configured VisualSvn Server to just use a non-secure connection, which then lead to this error:

Could not read chunk size: connection was closed by server

Okay…  So then I got smart and tried something slightly clever – I bypassed the server entirely:

svn log -v file:///d:/dev/Subversion/myproject

Now I finally got the REAL error message:

svn: Malformed file

So then I tried this:

svnadmin verify d:\dev\Subversion\myproject

But that reported that every revision verified just fine!?  But when I run the “svn log -v” again revision 147 still bombs, so it looks like “svnadmin verify” is not really doing a very good job.  The “svnadmin recover” command does nothing, and completes almost immediately saying that everything is fine.  (at this point, I am really not happy with Subversion – how many other internal corruptions are there?!)  I tried doing a dump of the repository:

svnadmin dump d:\dev\Subversion\myproject> d:\tmp\SubversionRepository.dump

but that also failed on revision 147.

Back to Google!  Apparently people are just hoping that the revision is early in the product development life cycle and then dropping all the revisions before that:  Sigh.

So then I ran:

svnadmin dump –revision 148:HEAD d:\dev\Subversion\myproject > d:\tmp\SubversionRepository.dump

and got some error messages that things were referencing revision 145, which is before when I’m now dumping so loading into an empty repository will fail.  What’s really odd is that it didn’t stop there, it just kept going, so if I wasn’t watching it I might not have noticed that the dump was bad.  So I had to run it again, skipping even more revisions and starting at 153 – 8 revisions AFTER the corruption.

What good is a revision control system if the revision history silently becomes corrupted and the only solution is to drop all the revisions before that!?!? Sadly, I’m not alone:

So with my partial dump completed I did a load into a new repository:

svnadmin create d:\dev\Subversion\myproject_fixed
svnadmin load d:\dev\Subversion\myproject_fixed <

This command took a while to run, but it seemed to be successful.  I can now do a svn log -v against the repaired repository.

And the PlasticSCM importer is now working; Goodbye Subversion!

Subversion says: I’ve just sucked 2.5 hours of your life away.
[Robert cries and moans in pain]

Pining for a distributed version control system

I would LOVE to use a distributed version control system. While my main computer was down over the last week I was using my laptop for development, and I couldn’t check-in anything (The server was of course on my main desktop)!

Usually I’m developing one feature on my main computer and a different feature on my laptop; having a distributed version control system would be perfect because I could be checking things in on my laptop (where I do all the easy features) and only merge them into my main computer when I’m done the next major feature on it.

Bazaar – looks great

Specifically, I’d love to be using Bazaar, which at first glance looks great!   The website looks great, the focus on functionality (such as rename) looks great, the focus on usability and different workflows looks great.  This software looks great.

Subversion is almost great

About once a week I get bitten by some Subversion weirdness, almost always around renames, and sometimes caused by I don’t know what but files/directories either disappear or stick around after I’ve removed them.  Like the famous Mark Shuttleworth blog posting, I think renaming is very important; I didn’t use to think this but the more I get bitten by the lack of good/real rename support in Subversion the more I want it.

Distributed version control is not there yet

I realized the other day that I’ve become reasonably demanding about my version control.  I didn’t know this about myself, it just crept up on me.
The top features I want are, in no particular order:

  • EASY to use
  • Distributed
  • Hi quality rename support
  • The ability to do things directly in Windows Explorer (like with Tortoise*)
  • The ability to a few things in Visual Studio
    • Diff (VERY important)
    • Commit
    • Update
    • Rename files
    • Easily switch between branches

Kyle Cordes has a very nice blog posting on this subject here.

Command line tools – WTF?!

Unlike Kyle I don’t really care if it has a great standalone GUI as long as I’ve got the above features and I can easily see the revision tree somwhere then I’m good.

Additionally, unlike the <4% of Linux users (and what smaller subset of them are developers?) I NEVER want to use the command line to interact with my SCM.  Ever.  Period, exclamation point full stop.

When I read about GIT’s 2 million command line tools each one of which probably with hundreds of esoteric command line switches each of which probably accepts multiple types of options I think, “Who actually needs that and wants to spend time NOT developing to learn it all while potentially doing something disastrously wrong that could serious mess up your core repository?!”  When I read that Mecurial’s command line tools are almost the same as Subversion’s, I just don’t care!  Can you get a decent human readable diff from the command line?  Can you get a meaningful navigable tree hierarchy from the command line?!  (Plastic SCM even has a 3D revision tree for crying out loud – I DARE you to do that in a console window).  Even most Java developers (who don’t even know the kind of productivity we achieve with .NET and VS) want to do things right inside Eclipse.

For crying out loud, we’ve had graphical user interfaces since 1979 people!  If your DVCS only provides a command line interface then it’s not feature complete!  If you have to declare that your “interface is far from perfect or at least bug free” and requires 29 steps to install it then it is not feature complete.  Free is great if its works well, but I will happily pay for quality software if it does what I want at a reasonably price (read:  something a small start-up business can afford without taking out another mortgage).  (Sorry for the rant.  I do feel better now though.)  This all ties into…

It’s about productivity silly, not free software

I should mention that I do really appreciate free software and the fact  that people enjoy donating their time and expertise to free software projects.  However, I am a very goal oriented person.  I remember years ago when I was running Linux for the first time and I needed to print a report for some second year university class.  I discovered that Linux didn’t have a driver for my printer and when I asked around the overwhelming response was “Great!  Write one!”  I promptly uninstalled Linux, re-installed Windows and easily printed my report and achieved my goal of handing in the assignment.

If a tool doesn’t make me more productive than I am now thus helping me achieve my goals more quickly or easily then I’m not interested.  This is why I LOVE PostSharp and will happily pay for version 2 when it comes out.  This is also why (even though I spent 8 years working with Java and know it inside and out) that I actually dislike Java and Eclipse when compared to .NET because Microsoft and the smart people building .NET focus on making developers more productive with each release.  Conversely I saw a pannel at Java One a few years back that actually lauded Java’s complexity because it helped keep out the VB developers!  WFT?!  Sure Java will  let me run on 27 different platforms but I’ll probably never finish my software and all my prospecitve (paying) clients use Windows anway.

As a software developer I know how much time it takes to really learn the craft of designing, architecting and writing good software, and how much time it takes to actually write really good software.  Right now I’m working on building a software business, so yes, after dumping my life savings into this and living like a pauper for 2 years I’ll be charging for my software thank you very much.

So I will happily spend money on a distributed SCM if it helps me achive my goals (one of which is not breaking the bank however).  So if your free SCM doesn’t help me achieve my goals faster and easier than what I’ve got now then I don’t want to use it, and that means it needs to integrate to some extent into Visual Studio and Windows Explorer.

Why I’m using Subversion (sigh)

To this end, Subversion is very easy to use; sadly, it is not distributed and has terrible rename support that messes up about once a week but it’s manageable.  TortoiseSVN not only works on an x64 machine (which I think more and more developers have – if your development tools don’t support x64 yet then what the hell are you doing?!) but it actually exposes lots of the capabilities of Subversion (such as rename, for what that’s worth).  TortoiseBazaar, which I’d love to use doesn’t even support rename yet, which is weird considering that proper rename support is Bazaar’s claim to fame!

VisualSVN Server makes the server very easy to setup, and AnkhSvn 2.x is rock solid and wonderful so I can easily use Subversion from within VS2008.

BitKeeper, SurroundSCM don’t post their prices which means I probably can’t afford it, Code Co-Op (besides having a scary picture of a woman with a mustache on their home page) talks about the “latest” version of Visual Studio as 2005 (yikes), DARCS is apparently very buggy, and Monotone has a very cute mascot and no VS2008 or Windows Explorer tools whatsoever.

So I’m stuck with Subversion.  Sigh.