Nov
8
Switching to Subversion – First Thoughts of a CVS User
Filed Under Computers & Tech, Software Development on November 8, 2006 at 6:09 pm
I’ve been a CVS user for years but have spent most of those years cursing its short-comings. The main reasons I stuck with CVS despite this were:
- Lock-in – there is a lot of code in both my personal CVS repository and the one for the EVE project. If it ain’t broke …….
- Maturity – CVS has been around for donkey’s years. The code is stable, people know how to use it, and there are loads of tools and tutorials out there. Subversion is a lot newer and still changing.
- Inertia – it took a lot of poking and prodding over the years to get people using CVS, people don’t want to have to start the learning curve all over again!
I’ve been reading about how great subversion is for ages but had never quite gotten round to trying it myself. The reason I hadn’t tried it was because I’d never had an excuse to dedicate scarce time to it. However, a few weeks ago people in work started voicing an interest in Subversion so I took that as my cue to finally give it a go.
[tags]Source Control, CVS, Subversion, SVN[/tags]
There are lots of things different people find annoying about CVS but for me it just had two serious flaws:
- No support for moving and renaming files and folders
- Having to enter your password all the bloody time!
The reality is that when you start a project and first generate a directory structure you’ve probably gotten it at least partly wrong. I certainly never get it right first time. You are also going to be regularly adding files, particularly at the start of a project, and being asked to enter your password each time you do really annoys people. With subversion both problems go away. You can move around files and folders to your heart’s content, and when you add files you don’t have to give your password until you commit your changes.
To make things even better SVN is almost indistinguishable from CVS from a user’s point of view. You still checkout, add and commit. Granted, things are a lot different under the hood and at the server end but your average user doesn’t care about that. They don’t have to administer the server or setup and manage the repositories, they just get, edit, and commit code! Also, most developers don’t seem to use the command-line tools for CVS/SVN but prefer to use IDE plug-ins instead, so the fact that there are now loads of good SVN tools and plug-ins out there makes the transition that much easier for users.
I’ll admit it took me a while to get an SVN server set up but that was mainly because FreeBSD was in the humor for making me compile the sun moon and stars to get it installed 🙂 Even with FreeBSD being compile-happy (that’s what I get for using old alpha hardware) it only took me three afternoons to go from not knowing anything about SVN to having a working server with it’s first production repository setup and working. To get to grips with the basics I found the free O’Reilly book Version Control with Subversion invaluable, and to get SVN installed on a FreeBSD server this article from O’Reilly’s onlamp.com is very helpful.
The only slight downside is that unlike CVS you don’t get SVN ‘out of the box’ with XCode on the Mac but Martin Ott has released a nice OS X package so it’s not really a problem.
please read, http://svnbook.red-bean.com/, esp. stuff to do with branch management.
will make you life easier in the long run.
I can believe you don’t remember using svn when we worked on the nuimsu project.
Cheers for the link Vish!
As for the NUIMSU fiasco, I’ve purged that from my mind. If I try hard to remember then it was back when SVN was still alpha or beta and it was as un-reliable as a Windows ME server! When I think about it that experience may be the reason it’s taken 5 years for me to give SVN a go voluntarily!
Btw, if you’re using SVN on Windows, TortiseSVN is an excellent shell-extension based interface for it, very handy.
I am a longtime cvs user, and also recently set up a subversion server to manage all my personal projects. A couple of comments:
Why don’t you just save your password in a .cvspass file? Then you’ll never have to enter it.
Once you get into branching, I don’t think subversion is “almost indistinguishable” from cvs. In fact, I think it’s quite different, and somewhat less intuitive.
My experience setting up subversion (on OS X) was similarly complex. I’ve set up cvs servers before, and it takes much less time and is virtually foolproof. When I set up the subversion server, I initially used a berkeley DB datastore, as that’s the default. I very quickly ran into problems with checksums and all kinds of weird transaction errors. And this was only after importing a small project and trying to check it out on a different machine.
After doing some reading, I’ve been able to make subversion much more stable by dropping my old repository and creating one using an fsfs datastore, which seems much less brittle.
So far, I’m not wowed, and I still find CVS more intuitive, but maybe that’s just because I’m used to it. We’ll see how it goes. Here’s a post of mine about importing projects, which I also found somewhat less intuitive than in cvs:
http://onlinefactotum.blogspot.com/2006/11/importing-existing-project-to.html
Thanks for the link Chris!
Despite using CVS for about 5 years now I’d never heard of a .cvspass file. Sounds useful … though I’m not sure I like the idea of having my password lying around in plain-text.
Anyhow you’ll be happy to hear that, in the latest SVN the fsfs datastore has become the default. From what I can tell from reading countless horror stories like yours about BDB that’s a good thing!
I’ve never really needed to branch my CVS projects, just tag them and TBH I prefer SVN’s way of tagging. It all seems so much simpler with that nice directory structure.
Bart.
I have been considering SVN for a while now, but was not sure if SVN and CVS servers could reside on the same server (I assume they should, but you never know). Also, I wanted to install TortoiseSVN (I already have TortoiseCVS), but I am wondering if that will conflict. Any experiences?
Thanks
Hi Amer,
I’m not a Windows user so I can’t really help you with the TortoiseCVS/SVN question but I can tell you that there is no problem at all having CVS and SVN on the same server.
Sorry I can’t be of more help,
Bart.
Thanks Bart!
I’ll probably try it and let you know.
Amer