我在使用 git-p4 使用 perforce 设置 git 时遇到问题。在完成这篇出色的博客文章中的所有步骤后:http: //owenou.com/2011/03/23/git-up-perforce-with-git-p4.html,我尝试添加一个新文件/修改现有文件本地 git 存储库中的文件。
当试图变基时,我得到:
$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 存储库。