4

尝试按照此答案将现有的 git 存储库导入 SVN ;几次提交都很顺利,但后来我遇到了一个失败的预提交钩子。

r180827 = 444fa1c75e5a31fe8d887637a7fbd3fc62b34354 (refs/remotes/trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
Unstaged changes after reset:
M       [some file]
M       [another file]
M       [...etc...]
        A       [problem file]
A repository hook failed: 'pre-commit' hook failed with error output:
[error description]
  at /usr/libexec/git-core/git-svn line 922

我把钩子修好了,这样我就可以过去了;但是当我git svn dcommit再次尝试(显然错误)时,我得到了

[some file]: needs update
[another file]: needs update
[...etc...]

当我执行“git status”时,我得到:

#       modified: [some file]
#       modified: [another file]
#       modified: [...etc...]
#
# Untracked files:
#   (use "git add<file>..." to include in what will be committed
#       
#       [problem file]
#       [other file modified in the commit that created the problem file]
#       [yet other files modified in that commit]
#       [...etc...]

我想我可以吹走整个 SVN 树并重新开始,但我真的不想这样做。我如何从中恢复并继续 dcommit?

4

1 回答 1

1

由于dcommitting时出现以下错误,我遇到了完全相同的问题:

   0 [main] perl.exe" 5992 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
6635 [main] perl.exe" 5992 open_stackdumpfile: Dumping stack trace to perl.exe.stackdump

由于我找不到任何其他解决方案,我只是对现在“未提交”的更改进行了本地提交(根据问题中的最后一个示例),之后我可以再次运行 dcommit。这有效地将剩余的本地提交压缩为一个,但至少它起作用了。

如果有人知道更好的解决方案,将不胜感激。

于 2012-08-01T11:09:43.977 回答