#2: for each action that svn2tfs is not sure to have fully reproduced, a warning will be provided to the user.

#3: for each action that svn2tfs is not able to reproduce, an exception will be thrown.

Above points have been referenced from https://svn2tfs.codeplex.com, author himself has mentioned these points. Also this application isn’t updated since 2011.Also one bug that we found is – Our TFS Server requires credentials to enter. While in this svn2tfs.exe application there is no way to enter credentials and hence we weren’t able to deploy solution on TFS with the help of this application.

If there are more numbers of changeset (commits/versions) in solution the longer time it will take to fetch solution from SVN to GIT. It takes one commit at a time append changes and so on.

So in our project, we kept for around 17+ hours and still, it was running. So we took latest (Head Revision) Project and did Checkout in TFS.

If your solution contains a lot of versions and you don’t have enough time to wait for many days, then it will be good to commit whatever you have in local i.e. Head Revision, directly at TFS, without migrating the solution. If it doesn’t contains much changeset then you can easily migrate your project to TFS. It will also provide you the details of what files were changed with each changeset and what code changes were done.

Now for Checkin Solution from GIT to TFS.

Download (http://nikkipunjabi.com/svn2tfs/GIT2TFS.zip) batch file make necessary changes and then execute. First copy this file to a Directory where you have checkout Solution from GIT. And then execute this file from that folder where GIT Solution is present.

Note: Please try to keep the folder/file names as short as possible, at TFS as well as in Local — Keep path as much shorter as possible. For Sitecore friends, we need to be careful for TDS Items Path because the character limitation is 255 Characters. Even when we do TDS – Sync with Sitecore – Limit is 255 Characters Path.

Limitations with this approach:

1) It won’t bind the users – who did the changes won’t be identified by this, only the person whose credentials are used for migrating solution on TFS will come.

2) Date and time won’t come – On which date the changes were done will not come.

All the version history from SVN to TFS will be mapped except user and date-time.

Ideal Solution:

In order to overcome this problem, there is an option of USERMAP file which will bind the SVN usernames with TFS users. We tried with USERMAP but we were unlucky and due to time constraints we skipped it. If you are successful in mapping user via USERMAP file then do comment on this post.

Workaround:

If you have tried manual approach you will see that it has appended the user name and date-time who did the commit after the comments in the comment section. “Metadata” argument written in the command helped us to append username and date time in the comment section.

Now when you checkout your TFS solution in your local folder and when you open solution in visual studio and if you see that the version controlling is automatically changed back to SVN, then you have to change the source control for the solution.

Open the solution file and follow the below steps.

Go to File-> Source Control -> Advanced – Change Source Control

Bind all the projects with TFS

If you aren’t allowed to make changes or if it gives you error then please first of all unlock the SLN File from source control explorer and then do the above changes.

I hope this helps you in migrating solution from SVN to TFS.

If you have any other better idea or approach or suggestions then do reply in the comment.