Subversion to DiscountASP.NET Hosted Team Foundation Server 2010 Migration

A neat tool that I came across is svn2tfs and as its name suggests, it’s a utility that can be used for moving data from Subversion over to our hosted Team Foundation Server 2010.

As a general precaution, before proceeding, make sure that you have checked-in any changes on both platforms that you’re working with and that a backup is available for both Subversion and your DiscountASP.NET Team Foundation Server 2010 database. If you need a backup of your Team Foundation Server database, please open a ticket with the Technical Support department using the Support Portal.

Download and install svn2tfs 1.2 and the system requirements are available in the svn2tfs documentation.

Once you run the application, you’ll see that it’s a very basic interface.

While it’s a very top-to-bottom application, I’ll be working out of order slightly since there’s some tasks that will need to be handled prior to migrating.

First, we’ll work on getting the users created.

There isn’t a way to cover every variable under a single guide so for simplicity’s sake, we’ll just create a one-to-one Subversion to Team Foundation Server 2010 user matchup. You’ll need to access the TFS Control Panel  Manage Users tool and then create a corresponding TFS user for each of your current Subversion users. If you need to purchase additional TFS users, you can contact our Billing Department.

After the users have been created, click on the “Help” button under the “User mapping” section in svn2tfs to produce a sample XML file. It’s fairly straightforward and you will want to use a text editor to create the mapping file. Here’s the settings that I used:

<?xml version=”1.0″?>
<ArrayOfUserMap xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema“>
<UserMap>
<SvnUserName>projectmanager</SvnUserName>
<TfsUserName>mycollection_manager</TfsUserName>
</UserMap>
<UserMap>
<SvnUserName>jjun</SvnUserName>
<TfsUserName>mycollection_jjun</TfsUserName>
</UserMap>
</ArrayOfUserMap>

Save the file and then click on the “Open” button under “User mapping” in svn2tfs and select the file path.

Next, we’ll work on getting the DiscountASP.NET Team Foundation Server 2010 connection prepared.

Perhaps I didn’t read the documentation thoroughly or search in the right places but I wasn’t prompted for a user name and password so I had to make a bit of an adjustment here. What I ended up doing was saving my DiscountASP.NET TFS user information for a Project Collection Administration through the Credential Manager in Windows 7. For information on saving the connection information, please check the “Stop asking me for my !@#$% password!” post.

For the Team Foundation Server 2010 information, you’ll want to specify the following:

  • URL: Server URL from the Account Information page, for my review, it was https://tfs01.discountasp.net/tfs
  • Folder: \Main\Source
  • Collection: Your Team Project Collection name that can also be found in the Account Information page
  • Project: The Team Project that you’ll be importing to

Click on the “Validate TFS” button just to verify that you can connect and we’ll work on the top section.

For the Subversion settings, you’ll need to make sure that you have your server URL, user name and corresponding password.

If you’ll be moving the entire repository, leave the path field blank and leave the revision at 1.

Now, one of two things will happen when we click the “Import” button. Either everything will magically work and then you’ll be set (it happened on my second import attempt!) or be prepared to fix a lot of problems.

Most of the errors that I ran across were fairly easy to fix but there were some that proved to be quite a challenge. Luckily, there are a few good resources other than smashing your head available which are the svn2tfs discussion forum and of course Stack Overflow that I was able to turn to for help.

2 thoughts on “Subversion to DiscountASP.NET Hosted Team Foundation Server 2010 Migration

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.