git svn命令在克隆svn repo的过程中崩溃。如何解决?

时间:2014-12-10 06:02:04

标签: git svn git-svn

我有一个带有以下结构的svn回购

ProjectX
 -> trunk
 -> tags
     -> 1.0.x
     -> 1.1.x
 -> branches
     -> 1.1.1

我正在尝试使用git svn将此repo转换为git repo,但git svn在中间崩溃并出现以下错误:

Use of uninitialized value $resolved in scalar chomp at /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn line 1764.
Use of uninitialized value $resolved in scalar chomp at /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn line 1764.
error: there are still refs under 'refs/remotes/svn/tags'
fatal: Cannot lock the ref 'refs/remotes/svn/tags'.
update-ref -m r133452 refs/remotes/svn/tags 819b5012690ffe22208d5727ad26673e2670560e: command returned error: 128

command failed:
git svn fetch

我不确定发生了什么,但它崩溃了,它开始获取在1.1.x分支上完成的标记。如何解决这个问题?

1 个答案:

答案 0 :(得分:2)

几点建议:

  1. 使用svnadmin verify检查存储库中存储的数据。 svn存储库可能存在错误。如果你可以使用svn(通常的操作:checkout,update,commit)来使用它,那么存储库损坏的可能性非常小,但是检查并不会有害,只是为了确定。如果svnadmin verify报告错误或不一致,那么...我不知道是否/如何解决它。

  2. 使用SubGit进行转换;它产生的结果更好git svn

  3. 如果SubGit不符合您的需求,请安装最新版本的Git。 Apple提供的版本总是落后于最新版本。下载并编译最新版本或安装Homebrew并使用它来安装较新版本的Git

相关问题