2012-06-05 123 views
4

嘗試導入一個現有的git倉庫到SVN每this answer;順利進行了幾次提交,但後來我發現了一個失敗的預提交鉤。繼續部分git svn dcommit失敗預先提交鉤子

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的狀態」,我得到:

#  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

我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。這有效地將其餘的本地提交壓縮成一個,但至少它工作。

如果有人知道更好的解決方案,將不勝感激。

+1

我得到了這個錯誤,但它花了一些時間讓我解決。你的解決方案對我而言並不成功。 [請寫一篇冗長的總結](http://mikerobertking.blogspot.com/2014/06/git-svn-dcommit-exception.html)瞭解正在發生的事情以及如何解決這個問題,以防止其他人花費無數個小時這個問題 –