如何从perforce repo中间克隆git-p4? [英] How to git-p4 clone from the middle of a perforce repo?
问题描述
我想克隆我的回购的后半部分。它使用以下命令正常工作:
I'd like to clone the second half of my repo. It works correctly using the command:
git-p4 clone --detect-branches //depot@all
所以我想运行下面的代码,但它不会以相同的方式导入文件,并最终失败:
So I want to run something like below, but it does not import the files the same way and eventually fails:
git-p4 clone --detect-branches //depot@2000,3000
如何才能让第二种方法正常工作?
How can I get the second method to work correctly?
更新 :我现在得到的输出是p4陷入无限循环:
Update: The output I get right now is that p4 becomes stuck in an infinite loop:
current change 32688
trying: earliest latest 6135ce72f69ce262a6237c98da9ffee652be8b03
Reading pipe: git rev-list --bisect 6135ce72f69ce262a6237c98da9ffee652be8b03
Reading pipe: git cat-file commit 6135ce72f69ce262a6237c98da9ffee652be8b03
推荐答案
好的,我的主要问题是我错误地改变了起始版本号。
Ok, my main problem was that I transposed the starting version number incorrectly.
我的客户规格:
My client spec:
View:
//depot/main... //HOST/main...
//depot/dev... //HOST/dev/...
//depot/patch... //HOST/patch...
和命令:
and the command:
git p4 clone --verbose --use-client-spec --detect-branches //depot@32668,#head repo
现在,唯一的问题是
Now, the only issue I have is the branches in the repo have the branch name prefixed to the directly tree:
main/file1.txt
dev/file1.txt
patch/file1.txt
现在有效。我更新了我的git-p4脚本(v1.7.12-rc3-4-g91e4bfe)版本来解决这个问题。如果可以的话,我会尝试推入主线其他人试图做同样的事情
It works now. I updated my version of git-p4 script (v1.7.12-rc3-4-g91e4bfe) to fix this. I'll try to push into mainline if I can for anyone else trying to do the same thing
这篇关于如何从perforce repo中间克隆git-p4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!