2012-09-11 83 views
0

我在使用git-p4的perforce設置git時遇到了問題。 完成這篇出色的博客文章中的所有步驟後:http://owenou.com/2011/03/23/git-up-perforce-with-git-p4.html,我嘗試添加一個新文件/修改本地git存儲庫中的現有文件。git p4軟件倉庫路徑錯誤

當試圖變基我得到:

$git-p4 rebase 
Traceback (most recent call last): 
    File "/home/user/bin/git-p4", line 2362, in <module> 
    main() 
    File "/home/user/bin/git-p4", line 2357, in main 
    if not cmd.run(args): 
    File "/home/user/bin/git-p4", line 2051, in run 
    sync.run([]) 
    File "/home/user/bin/git-p4", line 2004, in run 
    changes = self.p4.p4ChangesForPaths(self.depotPaths, self.changeRange) 
    File "/home/user/bin/git-p4", line 232, in p4ChangesForPaths 
    assert depotPaths 
AssertionError 

犯變化Git和執行
git p4 submit --verbose
將推更改到P4庫後,我得到65534行輸出:

Reading pipe: git notes --ref=git-p4 show HEAD~1 
Reading pipe: git notes --ref=git-p4 show HEAD~2 
[...] 
Reading pipe: git notes --ref=git-p4 show HEAD~65534 
Traceback (most recent call last): 
    File "/home/wgorski/opt/git-p4/git-p4", line 2754, in <module> 
    main() 
    File "/home/wgorski/opt/git-p4/git-p4", line 2749, in main 
    if not cmd.run(args): 
    File "/home/wgorski/opt/git-p4/git-p4", line 1125, in run 
    self.depotPath = settings['depot-paths'][0] 
KeyError: 'depot-paths' 

不用說,更改不會推送到p4存儲庫。

回答

3

問題是git版本。我安裝了git 1.7.0,並且git-p4腳本需要git版本> = 1.7.1。 我建議更新到最新的git版本。

如果升級Git是不是一種選擇,你可以降級的git-P4腳本修訂不使用注意事項,如:

git checkout 994ec6ce71cb03786a27a77da77ac33a9e53e090 .

降級的git-P4之後,你需要從perforce檢查本地git回購。