# # Set the cache stale counter for the branch lock trigger. # Unix usage: # perl /whatever/Lockbranchstale.pl %changelist% %serverport% # NT usage: # c:/perl/bin/perl c:/whatever/lockbranchstale.pl %changelist% %serverport% # (Note that the name of this script might need to be an "8.3" filename, # depending on the version of Perl you're running.) # # Tested on Platforms: NT (as program, not service). # $ChangeNum = $ARGV; $ServerPort = $ARGV; $p4 = "p4 -p $ServerPort -u <review_user>"; `$p4 counter lockchange $ChangeNum`; exit (0);
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
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.