Implementing site-wide exclusive locking with p4 typemap
By default,
Helix Server
supports concurrent development. However, environments in which only one
person is expected to have a file open for edit at a time can implement
site-wide exclusive locking by using the +l
(exclusive open)
modifier as a partial filetype.
If you use the following typemap, the
+l
modifier is automatically applied to all newly added
files in the depot:
Typemap: +l //depot/...
If you use this typemap,
-
any file your users add to the depot after you update your typemap automatically has the
+l
modifier applied -
at any given time, only one user can have the file opened
The typemap table applies only to new additions to the depot:
-
after you update the typemap table for site-wide exclusive open, files previously submitted without
+l
must be opened for edit withp4 edit -t+l
and resubmittedfilename
-
similarly, users with files already open for edit must update their filetypes with
p4 reopen -t+l
filename