I'm migrating from Perforce to git, and in the process I'm trying to get the file structure right.
The current perforce structure is something like this:
//depot
/android
/main
/other_branches
/core_library
/main
/other_branches
and I'm shooting for something like this in git:
/android
/core_library
I set up my client spec View as follows (I'll worry about the branches later):
//depot/android/main/... //p4-git/android/...
//depot/android/core_library/main/... //p4-git/core_library/...
Wen I run the following, the full commit history appears, but no files.
set P4CLIENT=p4-git
git p4 clone --use-client-spec //p4-git/@all
The problem is in this line:
git p4 clone --use-client-spec //p4-git/@all
Here you're passing a client path (//p4-git
), but git-p4 expects a depot path. This causes problems later on when it tries to map Perforce depot paths to Git paths. Try running
git p4 clone --use-client-spec //depot/android/main/@all
instead.
Bear in mind that if you specify --use-client-spec
, git-p4 will automatically use your client spec, whichever one that is. It will also remember this choice and use it for future git-p4 commands. It's probably a good idea to:
P4CLIENT
is set to this client whenever you use git-p4If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With