我使用git-p4在本地使用git,并尝试将我的更改提交回perforce服务器。这是提交更改回服务器,我做不到。
我设置了一个客户端,以便它包含客户端中的所有库依赖项(遵循Using git-p4 to setup a git clone of a perforce client中的建议)。
//depot/libA/... //workspace/libA/...
//depot/libB/... //workspace/libB/...但是,对于主行源代码,我在工作空间目录中执行以下操作:
git-p4 clone //depot/my_project这将在工作区中创建并填充my_project目录。
以便src中的代码可以引用这些库。
问题是,当我执行git-p4 rebase时,我得到了以下错误:
$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-p4提交时(在我做了一次修改并做了一个git commit -a -m“测试”之后):
$ git-p4 submit --verbose
Reading pipe: git name-rev HEAD
Reading pipe: git config git-p4.allowSubmit
Reading pipe: git rev-parse --symbolic --remotes
Reading pipe: git rev-parse p4/master
Reading pipe: git notes --ref=git-p4 show 6b75260b956cb72102014783fcfcb2e0da6eb637
Reading pipe: git notes --ref=git-p4 show HEAD~0
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~3.
它永远需要花费时间(是否向服务器请求所有的变更集??)并失败并返回错误: Traceback (最近一次调用):
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 1088, in run
self.depotPath = settings['depot-paths'][0]
KeyError: 'depot-paths'我应该注意到,我没有使用git config来设置任何git-p4选项( https://git.wiki.kernel.org/index.php/Git-p4_Usage的维基似乎没有提到需要它)。
发布于 2011-05-10 21:54:20
你的客户规格包括//depot/my_project/...吗?
也许你可以把你的库放在一个客户机规范中,而把你的项目放在另一个客户机中。
也许:
working/
project-git/
.perforce -> P4CONFIG with project-spec
<p4-git project checkout>
.perforce -> P4CONFIG with libs-spec
libraries
perforce/
.perforce -> P4CONFIG with project-spec
<p4 project checkout>https://stackoverflow.com/questions/5902482
复制相似问题