Question

For example some parts of the client spec map files from a 'Published' depot. Is there a way for these so-called published maps to be forced read-only, i.e. they cannot be opened for edit?

For example (ignoring [not editable]):

//Development/foo/... //client/foo/...
//Published/bar/1.0/... //client/bar/... [not editable]
//Published/qux/2.0/... //client/qux/... [not editable]

In other words I want to prevent files from being opened (say, being locked by default) and am wondering if this can be enforced at the client spec level.

If not, is there a way available without making the 'Published' depot read-only to certain users?

Was it helpful?

Solution

The only way to do this properly is via the Perforce permissions table. You get to this either with p4 protect command or via the Admin menu in P4V.

Just open it up - you need admin rights - and add a line to the table to mark those files as read only. That will allow your clients to sync to the files but not be allowed to open for edit (or delete etc).

You have ultimate control in the permissions table. You could also refine this to allow just a subset of users to be able to modify the file, while everyone else sees it as read only.

The Perforce admin guide is pretty good on the permissions table. Direct link here.

OTHER TIPS

you can use p4 lock, which prohibits others from submitting changes.

you can also manage user access, see p4 protect and p4 group. i believe this can be used on a file by file basis.

You could create a dummy client and lock those files on the dummy client. Then, just don't let anyone use that client, e.g. by putting it on a server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top