我正在使用 git svn clone 将 svn 存储库迁移到 git,然后将克隆推送到远程源以充当新的 git 存储库。
使用这个过程到目前为止我已经成功迁移了 34 个 svn repos,但是在 git svn clone 过程中,有 4 个由于以下错误而失败
命令:
git svn clone --authors-file=authors.txt svn+ssh://git@server/path/to/SVN/project/trunk/repo_name repo_name.git
导致错误:
Svndiff data contains backward-sliding source view: Svndiff has backwards-sliding source views at /usr/libexec/git-core/git-svn line 5061
有没有人遇到过这个错误并找到解决方法,要么强制 git svn clone 忽略错误并继续,要么先修复 SVN repo?
我可能应该为这个问题添加更多背景知识。
我已经指出了各种工具的方向,以协助 svn 到 git 的迁移,但不幸的是,其中大多数是单向转换,不适合该任务。
我有大约 100 个单独的代码库要转换,每个代码库都是活跃开发中的实时系统,因此迁移将是一个分阶段的方法。
SVN 可能会用于部署/构建过程,因此我无法进行一次性转换,需要使用 git svn dcommit 来保持同步以在所有阶段回推。
最佳答案
切换协议(protocol)可能有助于解决此错误消息。我在使用 svn over https checkout 时遇到了同样的问题。我将协议(protocol)从 https://切换到 file://(同一台计算机中的服务器数据),这帮助我克服了这个问题。您可以查看支持线程的链接以获取详细信息:https://support.tmatesoft.com/t/subgit-svn-to-git-migration-issue-fails-by-svn-error-e185001/2428/5其他步骤。
这种解决方法帮助我将旧版 repo 迁移到 git 格式。我正在使用 subgit。
关于由于 Svndiff 向后滑动源 View ,git svn clone 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24904329/