Practical Subversion by Garrett Rooney

Practical SubversionI received an advanced copy of Practical Subversion by Garrett Rooney and read through it over the weekend. Mr. Rooney is a contributor to the Subversion project and has authored the latest book about the software.

Before I actually talk about the book, I think it would be helpful to point out that while I did receive an advanced electronic copy of the book in order to review it (probably due to other postings related to Subversion on this site) I am not being paid to review it. My interests in agreeing to read the book and write about it are solely to point out valuable resources to help people looking to implement Subversion in their environments, not to get paid. As I’ve written before in previous postings, version control and software asset management is an area that I see missing in many corporate software development environments (and worse than that, in many developers skill sets) and an area that I find very important from both a quality and team productivity perspective. My interests lie in highlighting this and pointing out books and tools that help people implement these tools in their environments.

Now with that out of the way, let’s talk about the book. In many respects, this book is a lot like the Pragmatic Programmer series of books. The book starts with some history of source control in general and source control systems like CVS and Perforce. He then gives you a brief history of the Subversion project and then spends the rest of the book walking you through using the tool.

This is a great book for beginners and a good reference for those of us who have used it for a while. The subjects covered include “A Crash Course in Subversion”, which is a 46 or so page detailed description of the Subversion commands with scenarios he walks you through, including setting up a repository, checking out a workarea, branching, merging, switching your workarea to another branch, committing and setting properties on files. There are also chapters on repository administration, repository migration, and advanced Apache integration (a chapter that while I knew most of the things covered, I found a few tidbits I didn’t know and am really glad that someone has finally covered this subject from a Subversion Administrator perspective).

Practical Subversion also has a chapter dedicated to Subversion Best Practices. This chapter outlines some of the recommended best practices for version control in general, but in the context of the Subversion system. It covers subjects such as the use of vendor branches to manage third party source code, using branches, rolling releases, and using test suites to test your code. This is a very good chapter of practical advice to help one manage the concurrent development of software using a source control system.

The section on branching best practices has some good advice but recommends the frequent merging of the trunk over to branches in order to ensure you are developing and testing the change in the context of the work going on in the rest of the project. While this is good advice, it also introduces other problems which aren’t covered. Subversion does not currently have merge tracking support, and in many instances in which you do frequent merges from the trunk to the branch in real life, you will run into conflicts when merging the branch changes back to the trunk where changes appear in both the trunk and the branch. In practical use, we have found that in order to do this effectively, the developer has to keep track of the revisions in his branch that resulted from trunk merges and merge around them when merging back to the trunk in order to effectively implement this best practice. Once the tool supports merge tracking this shouldn’t be an issue and is definitely a practice that should be followed. If you have dedicated staff to keep track of this stuff, this is the best way to do it. Your average developer, however, does not really want to learn enough about the tool to do all of this record keeping and you may hear frequent complaints about the extra work involved when doing frequent merges from the trunk to your development branches in real life.

Chapter 7 of the book cover topics such as integrating Subversion with existing tools, such as the bash shell, emacs and Ant, along with using Subversion on the OS X platform. It also covers other tools available for use with Subversion such as ViewCVS and SVN::Web. Finally plugins for Eclipse and Visual Studio .NET are briefly covered. This is a great addition to the book and something that I wish I had had during my initial planning of my Subversion rollout.

Finally, Chapter 8 covers the use of the Subversion API. This chapter starts off covering the use of the Apache Portable Runtime libraries relevant to Subversion and then covers the client, repository access and file system APIs. This chapter in and of itself is worth the price of admission in my opinion. This chapter is mainly for those who want to take advantage of the application libraries that the Subversion tools are written around and write their own tools around the Subversion tool. The Subversion team has done a great job of documenting the Subversion system as a whole, but the API documentation is sorely lacking and this chapter gives a really good high level overview of the API’s and how to use them.

Overall, I really liked the book. As I said earlier, this book reminded me a lot of “Pragmatic” series of books. It really is “Practical Subversion”, catering to both beginning and advanced users alike. The book will definitely be a great addition to my library and I recommend it for those who want to implement version control quickly in their environments. This book does not replace the Version Control with Subversion book, but it’s a great addition to it.

The only thing missing from this book that would make it completely indispensable is a chapter on setting up an automated build system with Subversion, using tools like CruiseControl. This small thing aside, there really isn’t anything missing from this book to get your development group up and running on Subversion.

One thought on “Practical Subversion by Garrett Rooney

  1. Pingback: Rooneg::Weblog

Comments are closed.