Steps in starting up with Subversion - moving away from Sourcesafe
As you may be aware, in my last post, I talked briefly about Subversion and Continuous Integration via CruiseControl.NET. This post is simply to list the steps I used in getting up to speed with Subversion and CruiseControl. It took a little time to research, read and get up to speed with all the new mechanisms and terms, so I thought I'd present it here, in one central location, for those who are thinking of doing the same.
So, first up, getting Subversion up and going.
1. Grab a copy of Subversion from here
2. Unzip the contents to a new folder somewhere on your system, basically wherever you want this to live.
3. Set a path to the 'bin' directory in this package, for your entire system. You can do this in windows via right clicking on the "My Computer" icon on your desktop. Select "Properties", select the "Advanced" tab, and click the "Environment Variables" button.
4. In the 'System Variables' windows, locate the 'Path' item, and add the path to the end of the string, separated with a semi-colon. So you would be adding something like ";c:\svn-win32_1_1_4\bin" to the path environment string.
Thats about it for Subversion itself. To test this, simply go to a command prompt and type one of the commands like "svn help" and you should see a help listing for that command.
To make Subversion nice and user friendly though, you'll want to install the TortoiseSVN Windows shell enhancement. It supports most of the command line Subversion command set from the Windows Explorer interface, but before you do this, there are a couple of things to know about.
The main distribution of TortoiseSVN uses a hidden directory named ".svn" in each directory to store specific repository information. Visual Studio 2002/2003 web projects do not like this directory and complain when loading up a web project. A message box is displayed to the effect "Unable to Refresh project directory" or some such message. Clicking OK continues on and successfully loads the project anyway, however it is an annoyance. Possibly solutions to this are:-
1. Before you load up the web project, clear/delete the VSWebCache directory thats usually stored in the "Documents and Settings\{user}" directory. This prevents the error message from being displayed, but re-appears the next time you load the project, unless you again clear/delete this directory.
2. You can not use web projects all together, and develop web apps using the standard class library development project (ie. ASP.NET apps without web projects) as described here.
3. You can download an alternate version of the TortoiseSVN shell enhancement that uses a directory name of "_svn" to store its repository information. This version comes with the caveat that it is NOT supported and is was simply created to alleviate this problem. Further development will continue from the main distribution, which uses the ".svn" directory name. Both versions of TortoiseSVN can be downloaded from here. Fortunately its actually pretty easy to switch between these 2 versions so its the option I have used. I originally started using the ".svn" version, ran into problems with VS.NET, uninstalled TortoiseSVN, renamed my ".svn" directories to "_svn" (using a script to traverse all my directories), and installed the "_svn" version of TortoiseSVN. It now works fine.
Migration from SourceSafe.
A lot of my projects were using SourceSafe so I had to migrate a majority of them away from Sourcesafe and any associated VS.NET integration, and into Subversion. I will detail that in my next post, but I basically used the "Unbind" feature from VS.NET in the "File --> Source Control --> Change Source Control" menu option to disassociate Sourcesafe from my project and used the explorer shell integration to import the data into the Subversion repository. Again, I will concentrate on that more in my next post.
Hope its been helpfull to someone. Until next time...