簡體   English   中英

SVN到GIT到TFS

[英]SVN to GIT to TFS

我有一個5歲的SVN倉庫,出於某種商業原因,我們想轉到TFS。 Codeplex的SVN到TFS工具存在錯誤並凍結。

想到了另一條途徑:將SVN克隆到GIT,然后將GIT回購推送到TFS。 下面是我的腳本

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

這帶來了很多問題:

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"

讓我知道其他人嘗試過這種方式或幫助我了解發生了什么。

有很多選項,但是您將無法解決提交日期的重置問題,TFS始終記錄對TFS實際提交的正確時間,而不是歷史日期。

SVN Bridge for TFS允許您使TFS像普通的SVN存儲庫一樣工作,從而使您可以執行SVN-> SVN遷移 TFS集成工具集也應該可以正常工作,但是在組織Subversion存儲庫的某些方式方面存在問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM