Patrick
Patrick

Reputation: 2544

How to create copy(workspace) of depot on local machine in P4?

What is equivalent of hg clone command of mercurial in perforce?

or

How to create a workspace using P4 command line commands?

I tried:

p4 sync //depot/my_depot/... //workspace/...

msg:

//depot/my_depot/... - must refer to client 'desk24'.
//workspace/... - must refer to client 'desk24'.

Can we tag in perforce, just like we do hg tag in mercurial?

Upvotes: 1

Views: 1346

Answers (2)

Samwise
Samwise

Reputation: 71424

To create a client workspace and populate it with the head revisions from the depot:

p4 client
p4 sync

To clone a local repository (i.e. copy all revisions from the depot into your own local depot with its own local workspace):

p4 clone -p P4PORT //depot/my_depot/...

Upvotes: 1

Related Questions