When I started at VoiceVault I mentioned I used to support Team Foundation Server in a previous life, it came to light that it has functionality that may benefit the company and make things a bit easier to manage than Subversion. I was then tasked with investigating migration from Subversion to TFS, my first stop was to have a look at the TFS Integration Platform crafted by the ALM Rangers. Alas, it wasn’t one of the projects I was involved in while I was a member…
I thought I’d make notes regarding the issues I hit, along with the solutions, in the hope it’ll help others following the same path. As the Subversion adapter wasn’t released and is still in “alpha” state it can be a bit tricky to get it up and running as you need to build the platform yourself first.
First of all, get the bits from here;
http://tfsintegration.codeplex.com/
Once downloaded and extracted, you should find a readme file in the “IntegrationPlatform” folder which you should read. Twice. Maybe three times, just to be sure. It includes information regarding building the platform specific to setting up the build environment as well as the required prerequisites to build the Subversion adapters. I’d recommend grabbing the latest bits for each of the prereqs rather than the specific versions listed. I’ll not add links here as they’ll be out of date in no time. There are also a couple of batch files in the same location which automates a few of these steps, further details are in the readme file.
Once you’ve followed the above, open the solution in Visual Studio and attempt a build. You’ll likely hit a few little issues, I recall I did, but they should be simple enough to work around and if not grab one of your devs to give you a hand. The first time through I hacked and slashed at projects until I removed a number that I thought weren’t required, then once I messed it all up I started again. One thing you can do is to not build the installers, I deselected these projects from the configuration manager at the solution level as I’d never be installing the platform, just building and copying across the binaries.
With regards to the database, you can find it in the “Tfs_IntegrationPlatform” project in the “Framework” folder. You should be able to deploy it from there. A non-Express instance of SQL Server is recommended as if you’ve a large repository to migrate you’ll hit the size limit of Express quite quickly. The connection string you’ll need to change for the tool to connect to the database is in the MigrationToolServer.config file, located in the “Tools\MigrationConsole” project.
Right, once you’ve got this far the fun really begins. Load the TfsIntegrationShell.exe application in the “IntegrationPlatform\Binaries\Debug\Bin” folder, if you’ve a database deployed and the connection string updated you should be presented with the start screen. Click “Create new” and navigate to the configurations folder, you should find an example Subversion config, then click open. Select the source and targets then the dialog should change. You’ll see a tab at the bottom of the screen labeled “xml”, if you have a number of users you wish to map then you’ll need to click on this and edit the <UserIdentityMappings /> section, an example is below;
<UserIdentityMappings EnableValidation=”false”>
<UserIdentityLookupAddins />
<DisplayNameMappings DirectionOfMapping=”LeftToRight”>
<DisplayNameMapping Left=”tom” Right=”tfs\tom” MappingRule=”SimpleReplacement” />
<DisplayNameMapping Left=”dick” Right=”tfs\dick” MappingRule=”SimpleReplacement” />
<DisplayNameMapping Left=”harry” Right=”tfs\harry” MappingRule=”SimpleReplacement” />
</DisplayNameMappings>
</UserIdentityMappings>
Click save to database, things will happen, then click “Start” under “Current Migration” in the left hand menu. If you are lucky, after a while, your migration will be complete. If you aren’t then the next article in the series may be of some help as it details some of the issues we hit, along with the fixes and links to the source materials for further reading.