Monday, August 29, 2011

From SVN to TFS: The Good, The Bad and The Ugly

For my recent MSDN TechTalk I did some research how to migrate a source control repository from SVN to TFS. While I am not advocating this migration, here are the options:

The Good:

Currently you have a choice of three tools:

imagesvn2tfs:
svn2tfs is a simple tool written in VB.NET. You need to have SVN installed in order for this tool to work. It basically replays every revision from SVN as changeset into TFS.

imageTFS Integration Platform:
The TFS Integration Platform is the Swiss army knife for many possibilities to get data in and out of TFS. The TFS integration platform is available as supported Microsoft product on Visual Studio Code Gallery and as bleeding-edge release on Codeplex. The SVN adapter is currently only part of the codeplex release.

imageTimely Migration:
Timely Migration is a commercial tool. There are different modules for different source version control systems. To migrate from SVN to TFS the SVNToTFS module is needed. It costs $1995. Trial versions can be requested, but they do not migrate the content of the files.

svn2tfsIntegration PlatformTimely Migration
open sourceopen source, from Microsoftcommercial, $1995
simple and easy to usemany features, complex, complicatedpowerful features, easy to use
enough documentationsparse documentationgood documentaion
SVN tags can be migrated as branchesSVN tags are migrated as branchesSVN tags are migrated to TFS labels
user-mapping is enforceduser-mapping is possible but not enforceduser-mapping is enforced and comfortable
migration is aborted in case of an errorsome errors can be manually resolved and migration can be then be resumedmigration gets resumed when restarting after error resolution

With each tool I was able to successfully migrate an example project from a local SVN repository.

The Bad:

svn2tfs: I was not able to migrate SVN repositories from Google Code. The tool systematically failed, because the initial repository revision for the project layout (dirs for trunk, tags and labels) has not author. The tool can not deal with that. On the positive side was, that the source code of the tool is very simple so that I was quickly able to create a patch, that fixed this problem. On the negative side was, that there was no reaction on the patch I submitted. The project seem pretty dead.

TFS Integration Platform: It seems not possible to do an aynonymous login to SVN. If you do not provide valid user/password, the migration fails with an ugly “NullReferenceException”. The documentation for the SVN adapter is sparse. For instance there was no documentation at all how to map svn users to TFS users. fortunately (after some nudging from my contact at Microsoft) my question in the forum was answered. Some days later even a blog post about the topic was published. Another shortcoming is, that the mapping from svn users to TFS users is not enforced. If no mapping is specified, each svn user is silently mapped to the user that is running the migration tool. There is no support in checking if all users from svn are mapped to TFS users.

Timely Migration: The only negative thing is the price since you probably need the tool only once.

The Ugly:

With none of the tools I was able to migrate the Nerd Dinner repository from Codeplex. Each tool either reported an error or froze indefinitely.

4 comments:

  1. There is still a lack of tools to make the migration, and our history wasn't worth investing in the commercial tool (we only had a small project in svn, most was in sourcesafe), still I was able to get the svn2tfs working from the sources (decompiled into C# as I really wasn't up to reading VB. Major problem for the hanging is the Log method based on events that hangs for revistions where there is nothing in it - replace by GetLog method works) moves will end up as branches if they fill in copypath etc.

    ReplyDelete
  2. svn2tfs is perfect.

    I converted it to c# to be able to modify it.
    It's working perfectly, now has possibility to continue broken session without re-sync of workspaces, saves revision maps and Replace opeartion is in process.
    ----------
    Integration platform is of absurd complexity and practically unmodifyable (for tight schedules)
    ----------
    And if I'm not wrong TM now costs $3000

    ReplyDelete
  3. svn2tfs is perfect.

    I converted it to c# to be able to modify it.
    It's working perfectly, now has possibility to continue broken session without re-sync of workspaces, saves revision maps and Replace opeartion is in process.
    ----------
    Integration platform is of absurd complexity and practically unmodifyable (for tight schedules)
    ----------
    And if I'm not wrong TM now costs $3000

    ReplyDelete
  4. checkout http://www.incyclesoftware.com/2013/08/migrate-svn-to-tfs-its-free/

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...