我正在使用git-p4在本地使用git并尝试将更改提交回perforce服务器。但是,我无法成功提交更改到服务器。
我已经设置了一个客户端,以便在客户端中包含所有库依赖项(遵循Using git-p4 to setup a git clone of a perforce client中的建议)。
我已经设置了一个客户端,以便在客户端中包含所有库依赖项(遵循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 submit 命令(在我单独进行一次更改并使用 git commit -a -m "test" 命令之后):
$ 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上的wiki似乎没有提到需要这样做)。