2012-10-25 30 views
3

我正在嘗試使用git-tf將現有的git存儲庫檢查到TFS預覽,並且當我嘗試執行時遇到錯誤簽入。這是我迄今爲止所做的。git-tf checkin在線程「main」中的異常java.lang.StackOverflowError

  1. 混帳克隆-b https://github.com/ git的克隆,我要檢查的分支,我想在一個未命名的掌握到TFS分支檢查。

  2. cd進入本地代碼路徑。

  3. 混帳TF配置HTTPS://.tfspreview.com/DefaultCollection $ /然後,我配置的git TF配置TFS連接。

  4. 混帳TF籤 然後,我得到了以下錯誤:

檢查到$/0% 的git-TF:沒有頭裁判

  1. 所以我當時創建了一個主分支,因爲我沒有通過執行以下操作:git分支-b主

  2. 切換回分支我檢出:git結帳。

  3. 再次嘗試檢查:git tf checkin。

  4. 這讓我失去了第一個錯誤。但是,我得到了以下錯誤,我不知道該怎麼做。

有沒有人有任何想法如何通過運行git tf checkin來通過下面的錯誤?

謝謝!

Connecting to TFS... 
Checking in to $/Sandbox/HammerheadGitTest/sCRM: 
Exception in thread "main" java.lang.StackOverflowError 
    at java.io.RandomAccessFile.seek(Native Method) 
    at org.eclipse.jgit.storage.file.PackFile.read(PackFile.java:614) 
    at org.eclipse.jgit.storage.file.WindowCache.load(WindowCache.java:314) 
    at org.eclipse.jgit.storage.file.WindowCache.getOrLoad(WindowCache.java:393) 
    at org.eclipse.jgit.storage.file.WindowCache.get(WindowCache.java:204) 
    at org.eclipse.jgit.storage.file.WindowCursor.pin(WindowCursor.java:334) 
    at org.eclipse.jgit.storage.file.WindowCursor.copy(WindowCursor.java:203) 
    at org.eclipse.jgit.storage.file.PackFile.readFully(PackFile.java:526) 
    at org.eclipse.jgit.storage.file.PackFile.load(PackFile.java:684) 
    at org.eclipse.jgit.storage.file.PackFile.get(PackFile.java:227) 
    at org.eclipse.jgit.storage.file.ObjectDirectory.openObject1(ObjectDirectory.java:439) 
    at org.eclipse.jgit.storage.file.FileObjectDatabase.openObjectImpl1(FileObjectDatabase.java:172) 
    at org.eclipse.jgit.storage.file.FileObjectDatabase.openObject(FileObjectDatabase.java:157) 
    at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:122) 
    at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:856) 
    at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:136) 
    at org.eclipse.jgit.revwalk.RevWalk.parseHeaders(RevWalk.java:965) 
    at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:814) 
    at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:725) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:260) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286) 

最後兩行持續了很長一段時間。

回答

2

我收到了關於codeplex.com的回覆,解決了這個問題。下面是我得到了答案:

你好,

你是因爲你試圖在一個巨大的承諾樹檢查與發現這個問題可能比2000 - 3000深承諾。我們的代碼有一些遞歸邏輯來標識要提交的提交。這個邏輯因爲它本質上是遞歸的,所以它將JVM調用堆棧大小推到1800標記之上,這大約是JVM使用的默認限制,高於那個JVM會拋出一個你看到的StackOverFlowException。這是一個JVM限制,幸運的是,有一種解決方法可以通過使用參數來擴展堆棧大小以避免此錯誤。

您需要在git-tf部署目錄中更新git-tf.cmd(git-tf,如果不在windows中運行)並將-Xss3m附加到對「java.exe」的調用。

我們有一個用戶故事來使這個場景在未來更好。

感謝, Youhana

這裏是一個鏈接到了答案:http://gittf.codeplex.com/workitem/43

+1

此問題仍然發生4年後,是一個適當的修復嗎?? – Merijn

+0

對我來說,直接解決這個問題後,我得到了'java.lang.OutOfMemoryError:Java堆空間' - 用'-Xmx2048m'快速解決了:) –

相關問題