lockbranch trigger (and companion lockcachestale)
Triggers to allow ordinary (non-super) users to lock
branches of the depot against submissions without needing
access to `p4 protect`.
Users just add text files to a `well-known` place,
(say //depot/locks/*) these files contain lists
of depot paths that submissions should be
refused from.
I suggest each project leader is given permission
to set up a single file - say a file named
with their own name (or user name) and all
other users are prevented from changing files
in the //depot/locks area - that way you should
avoid unintentional denial-of-service events!
Obviously using these locks is slower than
the "protect" system, but it is useful when the
admin is too busy to add the lock.