TFS to SVN

时光怂恿深爱的人放手 提交于 2019-12-18 11:21:52

问题


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


回答1:


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.




回答2:


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();
    }


来源:https://stackoverflow.com/questions/371203/tfs-to-svn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!