git svn clone由于Svndiff向后滑动源视图而失败 [英] git svn clone failed due to Svndiff backward-sliding source view

查看:230
本文介绍了git svn clone由于Svndiff向后滑动源视图而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用git svn clone将svn存储库迁移到git,然后将克隆推到远程源以充当新的git存储库.

I am in the process of migrating svn repositories to git, using git svn clone, then pushing the clone to a remote origin to act as the new git repository.

使用此过程,到目前为止,我已经成功迁移了34个svn仓库,但是在git svn克隆过程中,由于以下错误,有4个失败了

Using this process I have successfully migrated 34 svn repos so far, but during the git svn clone process, 4 have failed due to the following error

命令:

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克隆忽略该错误并继续执行,要么首先修复SVN存储库?

Has anyone encountered this error before and found a way around it, either forcing the git svn clone to ignore the error and continue, or to repair the SVN repo first?

我可能应该为这个问题添加更多背景知识. 我已经指出了协助从svn到git迁移的各种工具的方向,但是不幸的是,大多数工具都是单向转换,因此不适合该任务.

I should probably add a little more background to this issue. I've been pointed in the direction of various tools to assist with the svn to git migration, but unfortunately most of these are a one way conversion and are not suitable for the task.

我大约有100个要转换的代码库,每个代码库都是处于活跃开发中的实时系统,因此迁移将是一种分阶段的方法.

I have approximately 100 individual code bases to convert, and each of these are live systems in active development, so the migration will be a phased approach.

  1. 创建每个svn存储库的实时git克隆->使用git svn rebase保持同步,然后推送到远程原始master分支. git处于只读模式(适用于开发人员).
  2. 开始使用git repo而不是svn进行代码审查
  3. 开始分支git repo进行更改而不是svn,将更改同步回svn. svn处于只读模式(适用于开发人员).

SVN可能会用于部署/构建过程,因此我无法进行一次转换,因此需要使用git svn dcommit来保持同步,以在所有阶段回退.

SVN will likely be used for the deploy/build process, so I cannot do a one time conversion and need to maintain the sync using git svn dcommit to push back at all stages.

推荐答案

切换此协议可能会有助于解决此错误消息.在https上使用svn签出时,我遇到了同样的问题.我将协议从https://切换为file://(同一台计算机上的服务器数据),这帮助我克服了这个问题.您可以查看支持线程的链接以获取详细信息:

Switching the protocol may help as a work around for this error message. I had the same problem when checking out using svn over https. I switched the protocol from https:// to file:// (server data in the same computer) which helped me to overcome the issue. You can check out the link of support thread for details: https://support.tmatesoft.com/t/subgit-svn-to-git-migration-issue-fails-by-svn-error-e185001/2428/5 for other steps. This workaround helped me to migrate a legacy repo into git format. I was using subgit.

这篇关于git svn clone由于Svndiff向后滑动源视图而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆