The Software Purist |




SVN as a Source Control System

Using SVN as a source control system is attractive if you’re a developer because it’s relatively lightweight, free, and holds a generic model which allows for a lot of flexibility. SVN promises to be a better CVS, fixing CVS’s flaws, while being the best source control system around. For a long time, I was a big proponent of SVN. It is very attractive for these reasons. Unfortunately, as I’ve gotten to use it more, I’ve realized that SVN unfortunately missed many of its goals.

User Management Issues

SVN as a lightweight system at first glance is believable because of it’s generic nature.  However, in some areas SVN is too lightweight.  For example, the user management facilities are basically plain text password files.  SVN does not provide a way to set permissions on any folder or repository either, so restricting access is not really possible.  You may be able to come up with some sort of a post-hook script that will do the trick, but I have not seen one and I can see this becoming quickly unmanagable.  Your best workaround to restricting access is to use keep each level of user access to different SVN repositories with different allowed users and using SVN externals, but this is also a mess, and quickly becomes not worth the effort.

Performance Issues

If you quantify SVN as a lightweight system, then you expect the performance to, at the very least, be at the middle of the ground for source control systems.  Yet, of all the source control systems I have used, SVN is the slowest.  SVN is inexplicably slow at times and I have not seen a good reason why.  For comparison, in my experience, Seapine Surround is on the order of 20x faster for checkouts.

Free … or is it?

Having a free tool is always a great thing, especially when you’re a small company.  However, there is a flipside to this, in that, by the virtue of the tool being free, you are subject to open source mailing lists as your means of customer support.  If you point out a bug in SVN, you risk being flamed in the newsgroup, and the odds of the bug being fixed are minimal, since it may be a feature.  In contrast, when you use a paid tool, companies are much more wary of potentially losing a customer if they don’t appease the customer on some issues.  My experience with commercial tools is that they marginally improve year by year, and the customer support is generally (but not always) much better than the open source community.  In contrast, I’ve used SVN for approximately 6 or 7 years, and the system hasn’t only made two noticeable improvements I can acknowledge: the –stack=empty option and slightly better (but still broken) merging.

Generic is Good, Except…

I am a huge fan of generic concepts and applying them where possible.  However, sometimes you can run into a situation where being too generic causes loss of critical information, which therefore makes tasks harder to complete.  Such is the case in the SVN, with the activities of branching, tagging and copying all falling under copy.  Tags are utterly broken in SVN, due to the nature that they are not frozen.  Yes, you can put a post-hook script in, but again, it’s maintenance overhead.  SVN doesn’t support real branches, which is one area where CVS clearly outshines it.  Because of the flaw in the branch model, the merge model can be very problematic.  In SVN, I cannot find a simple way to do a partial merge and have SVN be aware that I have done this.  My best bet is to keep track of global revision numbers, but this again becomes problematic, since the global revision numbers only make cohesive sense if you do a full merge.

Furthermore, SVN doesn’t provide a real file sharing mechanism.  Instead, it uses SVN externals.  However, this mechanism is flawed, because it’s hardcoded text, so if a location is moved or you want to tag a revision, etc… you now have the problem of a dead link, or possibly worse, a live link that is pointing to the wrong version.

Broken Checkouts

This happens so often.  It’s disappointing that this occurs so frequently.  It’s extremely easy to corrupt or confuse SVN, and you manually have to fix this situations in many circumstances.  For example, if a directory is moved and you aren’t notified, you get the oh-so-helpful error message that there is a conflict.  How to fix the conflict is up to the user to figure out.  Cancel a checkout or update and SVN leaves you with a partial checkout and doesn’t remove the locks.  Luckily you have the option to clean up the locks — but if it’s so easy to issue the lock clean up command, why doesn’t SVN do this automatically on cancel?

Flawed GUI Tools

The best GUI tool for SVN is TortoiseSVN.  However, TortoiseSVN has its own problems, including the fundamentally flawed model of being tied into Windows explorer.  Because of this, TortoiseSVN at times can spin a hard drive at max, desperately trying to keep its cache icons up to date.  This is a ridiculous misuse of processing power and TortoiseSVN has been attributed to hard drives failing faster than usual because of this.  The GUI interface is uninituitive, regardless.  For example, you use right drag to move.  The authentication model in TortoiseSVN uses SVN’s authentication only, so if you choose not to save your password permanently, it will ask you upon every operation.  Other tools save a session token and only ask once, but TortoiseSVN does not follow this model.

Where SVN is Superior…

My favorite SVN feature is that it allows me to recover from a mistake/oversight/unexpected future event.  In SVN, if I name a file one way, I can easily rename it tomorrow.  I can move folders later.  If a structure is started without the typical trunk/tag/branch structure, I can later move things around to ease this.  These sorts of tasks have never been as simple as they are in SVN, so I commend the SVN designer for this.  This is one thing that ultimately drew me to SVN.  It’s a shame that this is the most positive thing I have to say about SVN.


After years of my relationship with SVN, I’m ready to move on.  I am thinking git may be next on the horizon.  To give SVN some credit, I have yet to find the perfect source control tool.  Seapine Surround is closest, but without the ability to move repositories, folders and files effectively, it loses some important points.

· · · ·

Theme Design by