Reputation: 762
In perforce I have a repository in depot
. I want to make a copy of this repo under tasks
or streams
. Speaking with git terminology - to make a fork. How can I make it? I have a write-access to a repo in depot
.
Since I might confuse perforce terms, I will show with screenshot examples:
Under depot
I have several folders like this:
I want to copy one of the folders under depot
and paste it under streams
as shown on here:
Upvotes: 0
Views: 893
Reputation: 1
I just create a new depot in the GUI and then add a new stream (again from GUI) make it a top level stream and then it asks if you want to branch an existing stream across. Select the depot/stream you need to fork and then it will copy that into your new stream.
Upvotes: 0
Reputation: 71517
I'll give two different answers, neither of which uses the word "repo" or "fork" since those aren't terms in Perforce and they could mean two different things ("repo" could be a "depot" or a "server" -- the confusion is compounded by the fact that people sometimes say "depot" to mean "server" if their server only has one depot):
To branch a path //depot/thing
from your classic depot depot
into a new stream on the same server:
p4 depot -t stream streams
p4 stream //streams/thing
//depot
: p4 populate //depot/thing/... //streams/thing/...
To clone that path from your shared server into a mainline stream on a new personal server:
p4 clone -f //depot/thing/...
(The p4 clone
command automatically creates a stream depot, a mainline stream, and a client workspace on your personal server that will be created in the current working directory -- you should run this someplace outside of the client workspace that you use on the shared server.)
Upvotes: 2