不能svn2git公共回购

时间:2017-09-01 12:05:07

标签: git-svn svn2git

我需要将客户从SVN迁移到Git,所以我想先在公共SVN存储库上尝试使用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

为什么会这样?这是一个许可问题吗?

1 个答案:

答案 0 :(得分:0)

好吧,到目前为止一切都很好看。如果失败,您应该指定失败的消息。

除此之外,对于一次性迁移git-svn(您使用的svn2git工具基于git-svn正确的工具转储存储库或存储库的一部分。如果您想将Git用作现有SVN服务器的前端,这是一个很棒的工具,但对于一次性转换,您应该使用git-svn或基于它的工具,但是{{ 1}}更适合这种用例。

有很多名为svn2git的工具,最好的工具是来自https://github.com/svn-all-fast-export/svn2git的KDE工具。我强烈建议您使用svn2git工具。这是我所知道的最好的,它可以非常灵活地使用它的规则文件。基于svn2git的{​​{1}}遭遇与pur svn2git大多数相同的缺点,只是解决了一些问题。

您可以轻松配置git-svn规则文件,以便从当前SVN布局中生成所需的结果,包括可能存在的任何复杂历史记录,包括从一个SVN仓库生成多个Git仓库或组合如果你愿意的话,不同的SVN可以在一次运行中干净利落地进入一个Git repo。

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

尽管svn2git更容易入手,但除了灵活性之外,以下是使用KDE svneverever代替git-svn优于其他原因的其他原因:

  • 历史由svn2git重建得更好更清洁(如果使用了正确的历史记录),对于更复杂的分支和合并历史记录来说尤其如此,等等
  • 标签是真正的标签,而不是Git中的分支
  • 使用git-svn标记包含一个额外的空提交,这也使它们不属于分支,因此正常svn2git将不会获得它们,直到您将git-svn作为命令提供给默认情况下,仅提取指向已获取分支的标记。正确的svn2git标签是他们所属的地方
  • 如果您在SVN中更改了布局,则可以使用fetch轻松配置,--tags最终会丢失历史记录
  • 使用svn2git您还可以轻松地将一个SVN存储库拆分为多个Git存储库
  • 或将同一SVN根目录中的多个SVN存储库轻松组合到一个Git存储库中
  • 使用正确git-svn比使用svn2git
  • ,转化速度快了数十倍

你知道,svn2git更糟糕且KDE git-svn更优越的原因有很多。 : - )