开发者

git-p4 submission failure

I am using git-p4 to work with git locally and trying to submit my changes back to the perforce server. Its the submitting changes back to the server that I am failing to do.

I have a client set up so that it includes all the library dependencies in the client (following recommendations in Using git-p4 to setup a git clone of a perforce client)

//depot/libA/... //workspace/libA/...
//depot/libB/... //workspace/libB/...

However for the main line source, I am doing the following in the workspace directory:

git-p4 clone //depot/my_project

This creates and populates my_project directory in workspace.

So that the code in src can refer to the libraries.

Problem is that when I do git-p4 rebase I get the following error:

$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

When I do git-p4 submit (after i make single change and do a 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 sh开发者_JS百科ow HEAD~3

.....

It takes forever (is it asking the server for ALL changeset??) and fails with error: 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 1088, in run
    self.depotPath = settings['depot-paths'][0]
KeyError: 'depot-paths'

I should note that I have not used git config to set up any of the git-p4 options (the wiki at https://git.wiki.kernel.org/index.php/Git-p4_Usage does not seem to mention that it is needed).


Does you client-spec include //depot/my_project/... ?

Maybe you can have your libraries in one client-spec, and your project in another.

Maybe:

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜