简体   繁体   English

SVN到GIT到TFS

[英]SVN to GIT to TFS

I have a 5 year old SVN repo, for some business reason, we want to move to TFS. 我有一个5岁的SVN仓库,出于某种商业原因,我们想转到TFS。 SVN-to-TFS tool from codeplex is buggy and freezes. Codeplex的SVN到TFS工具存在错误并冻结。

Thought of a different route : cloned SVN to GIT and pushed GIT repo to TFS. 想到了另一条途径:将SVN克隆到GIT,然后将GIT回购推送到TFS。 Below is my script 下面是我的脚本

for i in "${!SVN_TRUNK[@]}"
do
    mkdir ${GIT_REPO[$i]}
    cd ${GIT_REPO[$i]}      
    fromRevision=$(svn log -l 1 -r{2013-06-01}:HEAD ${SVN_TRUNK[$i]} | awk '/^r[0-9]+/ {sub(/r/,"",$1); print  $1}' )
    toRevision=$(svn info -rHEAD ${SVN_TRUNK[$i]} | grep Revision | cut -d' ' -f2)

    git svn init ${SVN_TRUNK[$i]} --no-metadata
    echo 'svn fetch ' ${GIT_REPO[$i]} ' from ' $fromRevision ' to ' $toRevision
    git svn fetch -r $fromRevision:$toRevision

    git tf configure http://tfs:8080/tfs/defaultcollection '$/Portfolio Implementation/Versions/Iteration36RC/'${GIT_REPO[$i]}
    git tf checkin --deep
    cd ..
done

This brought many problems with it : 这带来了很多问题:

1.) No SVN revison in TFS to commits
2.) Date of all checkin to TFS is current date. I want date for the commit in SVN
3.) authors are all gone for all commits to TFS
4.) when I run git svn rebase to bring latest changes to my git repo it 
    says "Unable to determine upstream SVN information from working
    tree history"

Let me know someone else tried to move this way or help me understand what is going on. 让我知道其他人尝试过这种方式或帮助我了解发生了什么。

There are a number of options, but you won't be able to work around the reset of the commit date, TFS always records the correct time of the actual commit to TFS, not the historical date. 有很多选项,但是您将无法解决提交日期的重置问题,TFS始终记录对TFS实际提交的正确时间,而不是历史日期。

The SVN Bridge for TFS allows you to have TFS act like a normal SVN repository, allowing you to do a SVN->SVN migration . SVN Bridge for TFS允许您使TFS像普通的SVN存储库一样工作,从而使您可以执行SVN-> SVN迁移 The TFS Integration Toolset should work as well, but it has problems with certain ways a Subversion repository can be organized. TFS集成工具集也应该可以正常工作,但是在组织Subversion存储库的某些方式方面存在问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM