git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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_Branch

Well, 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-
Next: Daniel Barkalow
Message 1 of 3 in “[RFC] Using git-p4 on project with branches”
  1. Tor Arvid LundAug 18, 2008
  2. Daniel BarkalowAug 18, 2008
  3. Simon HausmannAug 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.