threads / discuss / 42838

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

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

## tl;dr

One message between Jul 13, 2016 and Jul 13, 2016.

replies: 0people: 1as markdown or json

Nikos Andrikos· Jul 13, 2016, 19:06 UTC · lore
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

← back to recent threads