[p4] Locking Directory

steve at vance.com steve at vance.com
Tue Aug 7 15:55:21 PDT 2007

Hi, Ron --

There only one good way to do it that I can think of off hand.

The first is with the protections table. The model is that you take away
everything with a '-' mapping then give back what you want to grant ('read'
or 'open' in this case, depending on whether you want to allow checkouts
for experimentation) when the directory is a sub-directory of something
with broader permissions. The following abbreviated example should
communicate the point:

read group everyone //depot/...
write group everyone -//depot/readonly/...
read group everyone //depot/readonly/...

There really isn't a trigger type for checkouts, although you could use one
of the change triggers if you don't mind people having it open for edit.

You could use 'p4 lock' to prevent submission, but that would only cover
things that already exist. You could modify the typemap to add +l to the
file type for things in that tree, but then you'd have to check them out to
prevent others from checking them in, and it wouldn't prevent the addition
of new files, potentially with user-overridden file types.


Original Message:
From: Cameron, Ron ron.cameron at pearson.com
Date: 	Tue, 7 Aug 2007 15:42:53 -0500
To: perforce-user at perforce.com
Subject: [p4] Locking Directory

I am having a problem and after doing some research, I have not found
the solution. I understand about locking files or placing the attribute
-l on the files themselves.  I want to make a directory only readable. I
know I can place a "-" in front of the group in the protect table, but I
don't want to effect other access for a particular group.  I want to
make the directory non-writable for everyone, but accessible for read
only.  Is there a way to do this?


This email may contain material confidential to
Pearson.  If you were not an intended recipient, 
please notify the sender and delete all copies. 
We may monitor email to and from our network. 
perforce-user mailing list  -  perforce-user at perforce.com

mail2web.com – Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail

More information about the perforce-user mailing list