git p4软件仓库路径错误 [英] git p4 depot-path error

查看:137
本文介绍了git p4软件仓库路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



试图重新绑定时,我得到:

  $ git-p4 rebase 
Traceback(最近一次调用最后一个):
在< module>文件中的/ home / user / bin / git-p4,第2362行。
main()
如果不是cmd.run(args):
文件/ home / user / bin / git-p4 home / user / bin / git-p4,行2051,运行
sync.run([])
文件/ home / user / bin / git-p4,行2004
changes = self.p4.p4ChangesForPaths(self.depotPaths,self.changeRange)
文件/ home / user / bin / git-p4,第232行,位于p4ChangesForPaths
中assert depotPaths
AssertionError

在将更改提交给git并执行

git p4 submit --verbose

应该将更改推送到p4存储库,我得到65534行输出:

 读取管道:git notes --ref = git-p4 show HEAD〜1 
读取管道:git notes --ref = git-p4 show HEAD〜 2

读取管道:git notes --ref = git-p4 show HEAD〜65534
Traceback(最近一次调用最后一次):
File/ home / wgorski / opt / git-p4 / git-p4,第2754行,在< module>
main()
如果不是cmd.run(args):$ b $,则在主
中的文件/ home / wgorski / opt / git-p4 / git-p4,第2749行b运行
self.depotPath = settings ['depot-paths'] [0]
KeyError:'在文件/ home / wgorski / opt / git-p4 / git-p4中,第1125行depot-paths'

毋庸置疑,这些更改不会推送到p4存储库。

解决方案

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



如果升级git不是一个选项,您可以将git-p4脚本降级到一个修订版本, t使用便条,如下所示:

git checkout 994ec6ce71cb03786a27a77da77ac33a9e53e090。



降级git-p4后,您需要从perforce中检出本地git repo。


I have a problem setting up git with perforce using git-p4. After finishing all the steps from this excellent blog post: http://owenou.com/2011/03/23/git-up-perforce-with-git-p4.html, I try to add a new file/modify an existing file in the local git repository.

When trying to rebase I get:

$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  

After committing the change to git and executing
git p4 submit --verbose
which should push the changes to the p4 repository, I get 65534 lines of output:

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'  

Needless to say, the changes are not pushed to the p4 repository.

解决方案

The problem was the git version. I had git 1.7.0 installed and the git-p4 script requires git version >= 1.7.1. I suggest updating to the latest git version.

If upgrading git is not an option, you could downgrade the git-p4 script to a revision which doesn't use notes, like this:

git checkout 994ec6ce71cb03786a27a77da77ac33a9e53e090 .

after downgrading git-p4, you need to check out the local git repo from perforce.

这篇关于git p4软件仓库路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆