如何从perforce repo中间克隆git-p4?

时间:2012-08-14 20:05:36

标签: git clone perforce git-p4

我想克隆我的回购的后半部分。它使用以下命令正常工作:

git-p4 clone --detect-branches //depot@all

所以我想运行类似下面的内容,但它不会以相同的方式导入文件并最终失败:

git-p4 clone --detect-branches //depot@2000,3000

如何让第二种方法正常工作?

更新:我现在得到的输出是p4陷入无限循环:

current change 32688
trying: earliest  latest 6135ce72f69ce262a6237c98da9ffee652be8b03
Reading pipe: git rev-list --bisect 6135ce72f69ce262a6237c98da9ffee652be8b03
Reading pipe: git cat-file commit 6135ce72f69ce262a6237c98da9ffee652be8b03

1 个答案:

答案 0 :(得分:2)

好的,我的主要问题是我错误地转换了起始版本号。

我的客户规范:

 View:
    //depot/main... //HOST/main...
    //depot/dev... //HOST/dev/...         
    //depot/patch... //HOST/patch...

和命令:

git p4 clone --verbose --use-client-spec --detect-branches //depot@32668,#head repo

现在,我唯一的问题是repo中的分支的分支名称以直接树为前缀:

main/file1.txt
dev/file1.txt
patch/file1.txt

现在有效。我更新了我的git-p4脚本版本(v1.7.12-rc3-4-g91e4bfe)来解决这个问题。我会尝试push into mainline如果我可以为其他人尝试做同样的事情