30 Dec 04
Using CruiseControl with Subversion
One of the convenient things about Subversion is that it looks and feels like CVS. If you’re comfortable with CVS, then learning Subversion is a breeze.To demonstrate the similarities, I ported the CruiseControl configuration files included in the Scheduled Builds chapter of the book to use Subversion. As you read through that chapter, you can pretty much say "Subversion" every time you read the word "CVS", while ignoring any references to CVSROOT. Likewise, any time you see the command cvs, think svn. Oh, and Subversion does support atomic commits, so the use of a quiet period with CruiseControl is less important.
For the cc-build.xml file on page 51 of the book (page 10 of the chapter PDF), replace
<cvs command="co dms" />
with
<exec executable="svn">
<arg line="co /path/to/svn-repo/dms/trunk dms" />
</exec>
There is an Ant task for Subversion, but it’s not distributed with the current version of Ant. I used the <exec> task because it gets this small job done with less configuration steps.
For the config.xml file on page 59 of the book (page 18 of the chapter PDF), replace
<cvs localworkingcopy="checkout/dms" />
with
<svn localworkingcopy="checkout/dms" />
The <svn> source control element is included with recent releases of CruiseControl.
And that’s all there is to it!

