在预提交挂钩失败后继续部分git svn dcommit

时间:2012-06-05 17:06:16

标签: git svn git-svn

尝试按this answer将现有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?

1 个答案:

答案 0 :(得分: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。这有效地将剩余的本地提交压缩成一个,但至少它有效。

如果有人知道更好的解决方案,我们将非常感激。