Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locking a branch in perforce?

Tags:

perforce

Currently after I create a release branch, but when we have some time before we release, I sometimes open the entire branch for edit and then lock all files in order to prevent anybody from modifying anything during "code-freeze" period in the release branch.

Is there a better way? Doing it my current way seems possibly like an incorrect use of the lock feature, is there a better way to keep somebody from checking in code without using branches. I though of P4 protect but I am not the admin on this perforce instance, and also dealing with the protect file at potentially 100s of lines would get cumbersome as well.

Any ideas?

like image 600
Ville M Avatar asked Mar 24 '09 16:03

Ville M


1 Answers

I'm doing this all the time as a builds engineer. I use 'p4 protect' to restrict everyone's access to the trees to read-only:

super group everyone * -//depot/project/branch/...
read group everyone * //depot/project/branch/...
super user me * //depot/project/branch/...

The first line closes all permissions for all users to the branch (assuming that the group 'everyone' is defined properly.)

The second line re-establishes read permissions for everyone.

The last line re-establishes all permissions to just me.

like image 190
Sniggerfardimungus Avatar answered Sep 28 '22 05:09

Sniggerfardimungus