Migrate SVN to TFS, its free ..

Posted by Sahas Subramanian - August 10, 2013

header-picture

Is there is any tool to migrate Subversion/SVN to TFS?

Answer is yes, there are several tools out there but you got to pay

Is there a free tool to migrate SVN code with full history onto TFS?

So far, the answer has been No or Yes, but not easy …we can use the TFS Integrator (Alpha build) but …it needs a lot of effort. And to be candid, we did attempt a few times and haven't been very successful.

This has been the response to my customers for fairly long time…however, SVN has been so popular centralized version control tool and free of cost, many enterprises have adopted. With increased ALM movement, demand to migrate the sources onto TFS is live and increasing as well.

Recently, I invested some time to figure out a hypothesis and that seem to have worked. As a result, the answer is, YES, SVN to TFS Migration is easy and Free ..

Here is how

There has been a lot movement towards Git + VS ALM integration in last year, following that closely sparkled an idea..


Clone SVN Repo to Git Repo

 

 

 

Once you have the local Git Repo, its upto you to choose the centralized repo for sharing. You could push that code out to TFS Git repository as I've shown in my previous article or to GitHub or to anywhere..

How is it possible to push a Local Git Repo to TFS Version control? Yes, absolutely possible.

Earlier this year, Git-Tf , a cross platform to enable collaboration between local Git and TFS VC was developed. I just used that to push my Git Repo over to TFS Version control.

(Carefully follow the documentation to setup Git-Tf before attempting this)

In my previous article, we have successfully cloned a centralized SVN repository to Local Git repository. Now, I'm going to take that forward and push it to TFS version control.

Below are the commands

  • Git tf configure <<collection>> <<empty folder in TFS version control>>
  • Git tf checkin --deep

Git tf configure will configure the local Git repo with central TFS version control folder

Git tf checkin will help us to push all git commits from local to TFS Version control. The switch –deep is the key to checkin commits as separate transactions. If you have 100 commits in local Git, using –deep will create 100 changesets in TFS. What If I don't use –deep, git tf checkin will rollup all 100 commits and check in as 1 changeset in TFS. So, choose wisely.

So, I ran exactly these commands and got desired output

----

Sahaswaranamam@INCYCLE ~/Source/Repos/teach-me (master)

$ git tf configure https://sahas.visualstudio.com/defaultcollection $/SVN2TFS/teach-me

Configuring repository

----

Sahaswaranamam@INCYCLE ~/Source/Repos/teach-me (master)

$ git tf checkin --deep

Connecting to TFS...

Username: sahas

Password:

Checking in to $/SVN2TFS/teach-me: 9%, commit cca81ed: collecting changes

-----

 

Pretty cool and fast..try this procedure out and share feedback..

 

 

 

 

 

Topics: Blog


Recent Posts

InCycle Recognized Across Americas

read more

InCycle, Microsoft & Cowboys

read more

InCycle Named Azure Data Explorer (ADX) Partner

read more