[RFC] Using git-p4 on project with branches
- From
Tor Arvid Lund <torarvid@gmail.com>
- Date
- Aug 18, 2008, 09:26 UTC
- Message-ID
- <1a6be5fa0808180226h79eebf46yad9174b1518d4eed@mail.gmail.com>
Hi!
I really appreciate the work that is done with allowing us poor souls stuck with perforce at work to use git via git-p4. But I'm wondering how to make it work when there are several branches on the perforce server.
Say, for instance, that I have this setup:
//depot/old/path/to/projectX //depot/new/path/to/projectX_Devel_Branch //depot/new/path/to/projectX_Release_1.2_Branch //depot/new/path/to/projectOther
It would be really nice, if I were able to make a projectX.git repository with the 'old', 'devel' and '1.2' branches. It seems that the --detect-branches argument to P4Sync wants me to enter //depot/new/path/to as the root path, and detect p4 branchspecs from there. That works poorly for me, since it would also include projectOther, which I don't want. It would also not include the 'old' branch.
I have looked briefly at the git-p4 code, but don't know it very well yet. Anyway, I suspect this functionality is not implemented... I might try to do this myself, and if anybody has ideas on how to get started, it would be much appreciated.
To support submitting changelists back to perforce, it would probably need some configuration (to determine which path to submit to in perforce)... Like:
[git-p4 "branches"]
old = //depot/old/path/to/projectX
devel = //depot/new/path/to/projectX_Devel_Branch
1.2 = //depot/new/path/to/projectX_Release_1.2_BranchWell, I guess I'm just wondering if this is something anybody but me would like to have? Or if there is another/better way to go about doing it...
-Tor Arvid-