21

Can you recommend any tool to migrate sources (with history) from TFS to SVN?

vvvvv
  • 25,404
  • 19
  • 49
  • 81

2 Answers2

22

Have you looked at 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.

Galwegian
  • 41,475
  • 16
  • 112
  • 158
  • Using tfs2svn v1, I always get the first changeset migrated into svn but then the client just hangs and does not import anymore changesets from TFS. Anyone else experienced this with tfs2svn? – LordHits Apr 01 '09 at 04:45
  • I was also unable to use it. It would error out on different changesets on different files with different errors. Never managed to get all the way through. – Kevin Berridge Jul 10 '09 at 20:21
  • 5
    I successfully used tfs2svn to migrate a repository with over five years of history and nearly 21,000 changesets. I wrote about the challenges I encountered and how I overcame them at http://esmithy.net/2011/02/01/migrating-from-tfs-to-svn/. – Eric Smith Feb 04 '11 at 19:39
1

We are migrating TFS 2010 collections into svn. To make it work for us I needed to download and modify the source of TFS2SVN so that it understood the collections we had made.

At the moment I just hard coded the values because we are only going to use this twice. We modified tfs2svn\trunk\Colyar.SourceControl.Tfs2Svn\Tfs2SvnConverter.cs as follows

public Tfs2SvnConverter(string tfsPath, string svnPath, bool createSvnFileRepository, int fromChangeset, string workingCopyPath, string svnBinFolder, bool doInitialCheckout, string tfsUsername, string tfsPassword, string tfsDomain)
    {
        ParsePaths(tfsPath, svnPath);
        this._tfsServer = "http://<tfs domain>:8080/tfs/<team project collection name>";
        this._tfsRepository = "<remote source location>"; // "$/<team project name>/..."
        //this._tfsExporter = new TfsExporter(this._tfsServer, this._tfsRepository, workingCopyPath, fromChangeset, tfsUsername, tfsPassword, tfsDomain);
        TfsClient.Provider.Connect(this._tfsServer, this._tfsRepository, workingCopyPath, fromChangeset, tfsUsername, tfsPassword, tfsDomain);

        this._svnImporter = new SvnImporter(this._svnRepository, workingCopyPath, svnBinFolder);
        _createSvnFileRepository = createSvnFileRepository;
        _doInitialCheckout = doInitialCheckout;
        _workingCopyPath = workingCopyPath;

        HookupTfsExporterEventHandlers();
    }
Benjamin
  • 131
  • 1
  • 6
  • Did your solution work once you made the code change? According to http://sourceforge.net/projects/tfs2svn/forums/forum/772710/topic/4548185 it looks like the code change didnt work for someone. – tpinet Dec 19 '11 at 19:42
  • Sorry, actually just saw your comment (years later). If I recall we gave up in the end, grabbed latest from TFS, and imported that into SVN. – Benjamin Mar 28 '17 at 17:56