Pragmatic Version Control Using Subversion

Author: Mike Mason
ISBN: 0974514063
Publisher: Pragmatic Programmers
Reviewed by: Dean Wilson

When it comes to version control systems, CVS has long been the workhorse of the Open Source and Free Software movements, but with the release of Subversion it’s time to put the old nag to rest; and this book tells you what you need to do it.

When it comes to software development the Pragmatic Programmers are widely recognised as masters of their trade, but with the release of their award winning Starter Kit Series they’ve begun to gain a reputation for writing, editing and finding book authors that are as talented as they are.

Pragmatic Version Control Using Subversion by Mike Mason is an excellent example. The book itself is an introduction to using Subversion (focusing on the command-line tools), but while it clearly covers all the essentials: basic commands, tagging, branching, etc. it also delves into some of the related, but often overlooked areas of version control.

Chapters on repository layouts, integrating third party code into your source tree and products and conflict resolution all help raise this book from just being a single application tutorial into a best practises guide that you’ll come back to long after you’ve gained confidence with Subversion itself.

Pragmatic Version Control Using Subversion is a very similar book to Pragmatic Version Control Using CVS, but this is in no way a criticism! The previous book was the best introduction to CVS that I’ve read and this related volume manages to retain the winning formula while adding useful sections, such as CVS hints, to help people migrating across.

While the book has an incredibly broad appeal, the ideal audience is the hordes of developers that know they should be doing version control but have heard it’s too complex, have been burnt by previous mistakes or just don’t know where to start. Seasoned developers will also find this book useful but in different ways. Whether using it as an easy to scan and follow reference, handing it down to less experienced colleagues, or even just for quickly bringing themselves up to speed when moving from CVS to Subversion.

Considering the book’s slim size (or quick download if you purchase the PDF version) it packs in a surprisingly wide coverage of the important topics. The first two chapters provide an overview and sell the benefits of using a version control system. They cover what should and shouldn’t be under version control and clearly explain the terminology required to understand both the technology in general and the book’s later chapters.

Chapters 3, 4, and 5 get you working from your own Subversion repository and introduce the essential commands. They show how to create, add and import your projects in a clear, easy to understand way. Once you have some files to work with, they take the reader through a well paced tour of the simple operations; checking out, committing and accessing the files in different ways.

Following these, Chapter 6, “Common Subversion Commands”, shows some of the more complex but essential tasks you’ll want to perform in Subversion; setting properties, looking at changes and their associated history and how to handle merge conflicts. These are all presented in short sections that provide enough information to be useful on a day-to- day while not leaving beginners bogged down in the minutiae.

Jumping ahead slightly we leave the part of the book that everybody using Subversion should read and move onto the more powerful, and complex, functionality such as “Using Tags and Branches” (Chapter 8) and the more abstract topics of “Organising Your Repository” (Chapter 7) and dealing with “Third Party Code” (Chapter 10).

Chapter 8 stands alone in the second half of the book due to its coverage of a very technical subject; chapters 7, 9 and 10 are more abstract. Tagging and branching are one of the more notorious areas of version control but this book, much like the CVS book before it, manages to explain not only when and how to use both tags and branches but also provides enough guidance to allow the reader to ‘smell’ when something’s wrong and adding them would make it worse.

Chapters 7, 9 and 10 logically combine to cover the issues surrounding setting up your own project. Its structure, how to integrate third party code, external projects and binary libraries such as Nunit or Java mock libraries. Considering the amount of maintenance coding vs new projects that happens in the world, these chapters might not be immediately useful to a fair chunk of the readership. I don’t think they should be removed, better to leave them in and show best practises and experience driven common sense than remove them and let people make the same mistakes over and over again.

It’s worth noting that the appendices are a lot more useful than the filler material typically found lurking at the back of a book, they cover a couple of topics that don’t fit elsewhere and help round out both the books coverage and appeal.

Appendix A is more relevant to system administrators than developers. It shows how to install Subversion on the server. It then gives a brief introduction to configuring, serving (using either the native svnserve, svn over SSH or via Apache) and adding basic security to your repositories. It finishes off with a short, but useful, digression into backing up your hard work.

This appendix provides a valuable, quick guide to getting a Subversion install in place. It’s a good starting point for anyone who needs to actually run and maintain a Subversion server.

The remaining appendices vary in usefulness. Appendix B is a concise introduction to migrating a CVS repository to Subversion; this is something you either need desperately or won’t care about. Most of Appendix C shows how to perform common tasks using the TortoiseSVN extension for Windows Explorer. This won’t appeal to the Unix/Linux crowd but might help sway Windows developers away from the hell that is Visual Source Safe.

Whether you’re new to version control in general or just Subversion itself this book is highly recommended. Clear, concise and crammed full of useful, important and dare I say, pragmatic, advice and information. An excellent book in it’s own right and a worthy addition to the Starter Kit Series.

Disclaimer: I was given a free review copy of this book. But I’d have bought it anyway.