Like many, many of coders before me I have used CVS to maintain my code. I’m not as disciplined as others, but I am comfortable using CVS and I think it’s fairly essential for a company to version their code (CVS and Subversion aren’t the only kids on the block in that aspect).
As part of setting up a development environment at Enotes.com after our migration I needed to finally bring the code into a versioning system of some sort. It was at this point that I thought I should look into Subversion. I was more than capable of setting up CVS, but CVS had some serious flaws that really annoyed me. Here are the reasons I went with Subversion instead.
- Subversion allows you to delete files and folders from the repository with
svn delete. CVS lets you delete files, but isn’t very kind in handling the removal of folders. SVN, on the other hand, recursively deletes folders and you don’t have to physically remove the file before removing it from the repository like you do in CVS (
rm -f file.php && cvs remove file.php)
- Subversion utilizes Apache 2.0 as a way to access repositories. I liked the idea of being able to use an application I was used to configuring as the access point for my repositories. How do you authenticate? HTTP AUTH. How do you connect via SSL? Buy an SSL certificate. Pretty simple and you can browse the repository from a web browser with
- Hooks in CVS where always confusing to me. I’m not sure why, but I never got around to setting them up. In Subversion there is a directory named
hooksin each repository that lets you create shell scripts that are fired at different points in the checkout/commit process.
The final note is that Subversion emulates a lot of CVS commands. For most of what you have to do replacing
svn will work just fine. Overall, I like Subversion. I don’t think it’s exceptionally better than CVS, just easier to work with.