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

Issue with git p4 clone when using multiple depots and multiple branches

From
NANikos Andrikos <nick.andrik@gmail.com>
Date
Jul 13, 2016, 19:06 UTC
Message-ID
<CANn5kOsr9K35oVErEeZetwphQpNLZbKRDraMoDzVq2rdVZ-XPg@mail.gmail.com>
Hi,
We have a perforce structure at work that looks like this:

//depot/basic/{main,branch1,branch2}/component{1,2} //depot/extra/{main,branch1,branch2}/extra{1,2}

I'm trying to create 3 branches, i.e. main/branch1/branch2, with all sub-components together, i.e. component1/component2/extra1/extra2.

For this reason I have created a p4 client, with all 12 paths used like this: //depot/basic/main/component1/... //client.name/main/component1/... //depot/basic/main/component2/... //client.name/main/component2/... //depot/basic/extra/extra1/... //client.name/main/extra1/... //depot/basic/extra/extra2/... //client.name/main/extra2/... ... similar also for branch1 and branch2.

I have setup my git using these: git config git-p4.clientclient.name git config git-p4.branchList main/extra1 git config --add main/extra2make

The problem is that all //depot/extra paths are ignored when I'm running the following command

> git p4 clone --use-client-spec --detect-branches //depot/basic@all //depot/extra@all --destination project

I think the issue is in git-p4 and especially in importNewBranch. Instead of using: """ branchPrefix = self.depotPaths[0] + branch + "/" self.branchPrefixes = [ branchPrefix ] """ We should be using """ self.branchPrefixes = [x + branch + "/" for x in self.depotPaths] """ Same also for "p4ChangesForPaths([branchPrefix], ..."

What do you think?

Thanks, Nikos

-- =Do- N.AND

Message 1 of 1 in “Issue with git p4 clone when using multiple depots and multiple branches”
  1. Nikos AndrikosJul 13, 2016

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.