Categories
Archives
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- April 2007
- March 2007
- February 2007
- January 2007
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
Whose Value Is It Anyway? | Home | Reading and Parsing XML In 1 ColdFusion Function
Filed under Architecture on December 27, 2007 by Joel PotischmanMigrating from TFS to SVN
Our 180-day evaluation copy of Microsoft Team Foundation Server expired today. We had decided for a variety of reasons not to purchase it (let the blog comments begin!), and to migrate our .NET source code from TFS to Subversion, which we use for all other projects. Naturally we needed the final copy of the source, and any history we could migrate over easily would be gravy, but we decided that for our needs (and not necessarily yours!), it wasn't worth investing much time or money in preserving all historical details (let the blog comments continue!).
While I found lots of tools and blog posts about migrating from SVN to TFS, I couldn't find anything about going from TFS to SVN without writing lots of code or buying expensive software we'd use exactly once. With a little tinkering I came up with the following method to export source code snapshots by date from Team Foundation Server so that we could commit changes sequentially by week into Subversion.
Yes, it loses check-in and check-out comments, but migrating source metadata would be a lot more work than migrating the source itself, and again, for our needs it was not critical. After all, our code is well organized and self-documenting. Isn't yours?
Hope this is useful for someone else out there. Yeah, it's a bit manual, but so what? In maybe an hour or two of total development+execution time I was all done, and TFS was retired. But by all means, feel free to automate this further and post your improvements.
- Create work folder "source" wherever you want
- In the work folder's parent, create the batch file TFSGet.bat containing the following three lines:
cd source "c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\TF.exe" get "*.*" /all /version:D%1 /recursive /overwrite cd ..
- Using the File -> Source Control -> Workspaces command in Visual Studio, point your project workspace to the new work folder.
- Run batch file with the first date, i.e. TFSGet 09/01/2007 (must use MM/DD/YYYY format)
- Use Subversion tools such as TortoiseSVN to add this initial revision to Subversion.
- Delete all the source code from the work folder, leaving the hidden .svn folder created by Subversion.
- Repeat steps 4 through 6, incrementing the date by day, week, month, etc. until you get to present day.
- Back up your Team Foundation Server databases through SQL Server's maintenance tools, just in case!
Trackback Pings (TrackBack URL for this entry)
http://www.arc90.com/cgi-bin/mt4/mt-tb.cgi/93.
Comments
This is very nice, thank you, one question, do you have any similar ideas for work items, I would like to get them into something like JIRA but at least a spredsheet would do!
Posted on June 6, 2008 11:05 AM by Joel Nylund
Sorry, we used Trac for work items, so I only had to migrate source code.
Posted on June 6, 2008 11:10 AM by Joel Potischman
If I have multiple sub folders I need to leave the .svn file in each folder right? Also do I need to force checkin to svn? How does it deal with new folders, deleted folders etc?
Posted on June 11, 2008 4:54 PM by Joel Nylund
Yes, you have to leave the .svn folder intact in all subfolders. As for folders added and deleted over time, remember that your Subversion check-in will only pick up changes in files already tracked by Subversion. You'll have to manually add or remove them in Subversion as you go.
Posted on June 11, 2008 5:01 PM by Joel Potischman
tfs2svn 1.0 has been released at Sourceforge
http://sourceforge.net/projects/tfs2svn/
tfs2svn is a Windows application that converts a Team Foundation Server (TFS) repository into a Subversion (SVN) repository, preserving the history, branches, and commit information.
Let me know if you have any questions.
Posted on September 24, 2008 12:15 PM by Kevin Colyar
Whose Value Is It Anyway? | Main | Reading and Parsing XML In 1 ColdFusion Function

http://sourceforge.net/projects/tfs2svn/
Posted on January 16, 2008 11:26 PM by Brian