Presented by Stuart Celarier
I planned on attending the Subversion talk as a brush up on what I already felt fairly comfortable with. It turned out to be the best session I attended at the entire conference. There's just something about learning new things that rocks!
Stuart presented the foundations of Subversion and how it differs from CVS. Corillian runs Subversion on Win2K3 server with Apache, where SVN executes as Apache module. This exposes SVN over the http:// protocol. We run SVN as a Windows service, so its exposed over the svn:// protocol. I'm not sure if we're missing out on anything here. I can get to my source code repository remotely or in the office; the protocol hasn't mattered to me yet.
So I learned some huge things about SVN, and a few tiny things:
Huge Thing #1: SVN tracks file name changes
So, if I need to change the name of a file, or even move a file, SVN will keep working just fine. It handles that event just fine. CVS would loose all of its history for a file if you moved it. There were even some gasps in the audience.
Huge Thing #2: SVN has ACID transaction semantics
That's right, its atomic! If you commit ten files, and the ninth commit fails due to a merge conflict, then they all roll back. This has implications for continuous integration too. You don't want your build to kick off before all of your files are checked in, or if the checkin bombs and only part of your code makes it into the repository.
Tiny Thing #1: Branching and Tagging are cool
A branch is a copy of the code base that you intend to modify. A tag is a copy of the code that you do not intend to change. You just tag it to place a reference to a state of the code at a given point in time. SVN doesn't care if you think its a branch or just tagged, it does the same thing; make a copy.
The copy is physically just a map of the changes. Its not a physical copy of all the files. That makes for much less work. You can branch locally and create a new path of code or you can branch remotely on the SVN server. That was a handy little tip.
Stuart walked the group through a nice example of branching some code, making changes, merging it with the trunk, continuing to modify it, then doing a final merge with the code to close out the branch. It can still get mind boggling at times, but the feature is so cool, I might have to find a T-Shirt for it on Wireless or something.
Tiny Thing #2: Hook scripts
Hook scripts are little bits of code that you can execute before a transaction commits. It might send an email or inspect the work to commit for business rules.
Tiny Thing #3: _svn folder contents
The _svn folder contains a pristine copy of the files in a given folder. This is what lets you checkout a project, get on an airplane, make changes to the file, groan in dispair at your bad idea, and simply revert back to the original. You don't need direct access to SVN to revert your changes. Of course, this means that your local copy is twice as big as the project files because you have physical duplicates of everything.
Stuart also recommended a white paper called Stringed Lines presented at Pattern Languages of Programming (PLoP) in '98. It describes patterns of branching and merging. I haven't been able to find an online reference yet.