How to git-p4 clone from the middle of a perforce repo?

邮差的信 提交于 2019-12-10 16:37:18

问题


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?

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

回答1:


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

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



来源:https://stackoverflow.com/questions/11959920/how-to-git-p4-clone-from-the-middle-of-a-perforce-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!