[p4] best way to prevent branching?
dfaison at photon.com
Fri Jun 9 13:07:07 PDT 2006
If your developers do all their work in sandboxes and the release
managers integrate their work into the main branches, then you can use
the protection table.
read user * * //depot/[product]/branches/...
write group rel-mgrs * //depot/[product]/branches/...
write group developers *
On the other hand, if your developers work directly in the main branches
too, then first thing I would do is make things less confusing by
restructuring a little bit...
//depot/[product]/branches/... (for main branches)
//depot/[product]/sandboxes/... (for sandboxes)
If the problem persists (which it might not) then you do need to enforce
things via a pre-submit trigger.
The trigger would work regardless of whether you restructured, though
your current structure would require two trigger table entries.
br-chk submit //depot/[product]/branches/..."br-chk.pl %user%"
br-chk submit -//depot/[product]/branches/developers/... "..."
Photon Research Associates, Inc.
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Jay Glanville
Sent: Friday, June 09, 2006 2:41 PM
To: Perforce Users Mailing List
Subject: [p4] best way to prevent branching?
What's the best way to prevent users from creating branches in the wrong
Now for the specifics ... we have a branching structure that looks like
We also have a sandbox area for each product in which the developers can
create what I call "developer branches", one where developers are
encouraged to make branches for their own purposes, something like this:
What we would like to do is make it so that only user X and Y can create
branches under the product's branches, but anyone can make branches
under the sandbox location. (Basically, X and Y are the release
The reason for this need is because developers have mistakenly created
branches in the wrong location, causing problems.
What is the best way to setup such a rule structure? I can't see how to
do it in the protections table. Is a trigger the only way to go?
Jay Dickon Glanville
perforce-user mailing list - perforce-user at perforce.com
More information about the perforce-user