Reputation: 3922
I have a project using Perforce. The scenario I am looking at is like below :
Multiple users submit their changes to Perforce repository and I would like to take a snapshot before syncing. I want to be able to revert if new release has some problems.
Basically I want to create a snapshot of current file which I can view with 'p4 have' and then revert to 'p4 have' files after syncing to head revision! How can I do that !
I tried to use 'p4 tag -l rel1 //depot/', but this command creates a label for head revision. I am looking for a way to do some command like this 'p4 label have' ! Is it possible ?
Upvotes: 1
Views: 1044
Reputation: 3659
You need to specify that you want the label to include just the files currently in your workspace:
p4 tag -l rel1 //depot/...#have
Or better yet use this shortcut:
p4 label myws
(define the label)
p4 labelsync
(labels what you currently have in your workspace)
Then you can restore with:
p4 sync @myws
Upvotes: 3