首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git p4仓库-路径错误

git p4仓库-路径错误
EN

Stack Overflow用户
提问于 2012-09-11 18:05:46
回答 1查看 479关注 0票数 0

我在使用git-p4使用perforce设置git时遇到问题。在完成了这篇优秀的博客文章:http://owenou.com/2011/03/23/git-up-perforce-with-git-p4.html中的所有步骤之后,我尝试添加一个新文件/修改本地git存储库中的现有文件。

当我尝试改变基址时,我得到了:

代码语言:javascript
复制
$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行输出:

代码语言:javascript
复制
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存储库。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-09-12 16:38:03

问题出在git版本上。我安装了git 1.7.0,git-p4脚本需要git版本的>= 1.7.1。我建议更新到最新的git版本。

如果不能升级git,您可以将git-p4脚本降级为不使用注释的修订版,如下所示:

git checkout 994ec6ce71cb03786a27a77da77ac33a9e53e090 .

在降级git-p4之后,您需要从perforce中查看本地git存储库。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12367328

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档