2017-09-01 73 views
0

我需要一个客户从SVN迁移到Git,所以我想先尝试在公共SVN仓库svn2git。不能svn2git公共回购

我发现一些公共的回购协议,例如,https://svn.alfresco.com/repos/alfresco-open-mirror/alfrescohttp://svn.apache.org/repos/asf/spamassassin。有没有做svn co的问题,但是当我尝试svn2git,我得到了以下问题:

D:\Documents\work\svn2git\apache>svn2git http://svn.apache.org/repos/asf/spamassassin Initialized empty Git repository in D:/Documents/work/svn2git/apache/.git/ Using higher level of URL: http://svn.apache.org/repos/asf/spamassassin => http://svn.apache.org/repos/asf W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: REPORT request failed on '/repos/asf/!svn/bc/100': File not found: revision 100, path '/spamassassin' W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r100 Checked through r200 Checked through r300

它跑了整整一夜,并与结束:

Checked through r22000 Checked through r22100 W: Ignoring error from SVN, path probably does not exist: (175002): RA layer request failed: PROPFIND request failed on '/repos/asf': PROPFIND of '/repos/asf': could not connect to server (http://svn.apache.org) W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r477700 Path 'spamassassin' was probably deleted: RA layer request failed: PROPFIND request failed on '/repos/asf': PROPFIND of '/repos/asf': could not connect to server (http://svn.apache.org) Will attempt to follow revisions r477601 .. r477700 committed before the deletion r477601 .. r477679 OK Checked through r748600 Path 'spamassassin' was probably deleted: RA layer request failed: PROPFIND request failed on '/repos/asf': PROPFIND of '/repos/asf': could not connect to server (http://svn.apache.org) Will attempt to follow revisions r748501 .. r748600 committed before the deletion Checked through r748700 Checked through r748800 Checked through r748900 Checked through r749000 Checked through r749100 Checked through r749200 Checked through r749300 Checked through r749400 W: Ignoring error from SVN, path probably does not exist: (175002): RA layer request failed: PROPFIND request failed on '/repos/asf/!svn/vcc/default': PROPFIND of '/repos/asf/!svn/vcc/default': could not connect to server (http://svn.apache.org) W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked through r805700 Path 'spamassassin' was probably deleted: RA layer request failed: PROPFIND request failed on '/repos/asf/!svn/vcc/default': PROPFIND of '/repos/asf/!svn/vcc/default': could not connect to server (http://svn.apache.org) Will attempt to follow revisions r805601 .. r805700 committed before the deletion Checked through r805800 Checked through r805900 Checked through r806000 Checked through r806100 Checked through r806200 Checked through r806300 Checked through r806400 Checked through r806500 Checked through r806600 Checked through r806700 command failed: git checkout -f master

为什么它发生了吗?这是一个权限问题吗?

回答

0

咳,到目前为止一切正常。如果失败,则应指定失败的消息。

但除此之外,对于一次性迁移git-svn(您使用svn2git工具基于git-svn)是的仓库或储存库的部分转换的工具。这是一个伟大的工具,如果你想使用Git的作为前端为现有的SVN服务器,但对于一次性转换,你应该使用git-svn或基于它的工具,但svn2git这是更适合这个用例。

有很多工具叫svn2git,可能最好的一个是从https://github.com/svn-all-fast-export/svn2git的KDE。我强烈建议使用svn2git工具。这是我所知道的最好的,并且它对你的规则文件可以做的非常灵活。这是基于git-svnsvn2git大部分来自相同的缺点比PUR git-svn受苦,只是周围的一些问题的工作。

您将能够轻松地配置svn2git统治文件来生成您从当前SVN布局,包括任何可能存在的复杂的历史要的结果,其中包括产生一些混帐回购了一个SVN回购或结合不同的SVN回购协议如果你喜欢,可以在一次运行中清理成一个Git仓库。

如果您不是100%关于存储库的历史记录,svneverever from http://blog.hartwork.org/?p=763是一个很好的工具,用于在将SVN存储库迁移到Git时调查SVN存储库的历史。


即使git-svn比较容易下手,这里是为什么使用KDE svn2git代替git-svn优越,除了它的灵活性,一些深层次原因:

  • 历史重建更好的和更清洁通过svn2git(如果使用正确的),这是更复杂的分支和合并的历史尤其如此
  • 标签是真正的标签,而不是Git分支
  • git-svn标签包含一个额外的空提交这也使得分支机构他们不要的部分,所以直到你给--tags的命令,默认情况下只标记指向获取分支还端来一正常fetch不会得到他们。有了正确的svn2git标签是属于他们的地方
  • ,如果你在SVN改变布局,可以轻松地与svn2git配置此,与git-svn你将失去​​历史最终
  • svn2git你也可以拆分一个SVN仓库分成多个Git仓库容易
  • 或结合在相同的SVN根多个SVN储存库到一个Git仓库容易
  • 转换是用正确的svn2git速度比与极大数倍git-svn

你看,为什么git-svn更糟,KDE svn2git更好。 :-)