[p4] best way to prevent branching?
Jay.Glanville at naturalconvergence.com
Fri Jun 9 18:29:48 PDT 2006
Thanks to Steven, Stephen, David and Matthew for their suggestions so
A though occurred to me, and I'd thought I'd share it to see how may
holes there are in the idea.
I've realized that I don't really want to prevent branches, but I only
want activities to take place in certain areas. (Probably the same
thing in the end, but there are some semantic differences.)
So, could I implement this using simple read (or open) and write
protections? Lets say I have the following branches:
Now, lets say the 1.1 and 1.2 branches are closed (the products been
released, and there is no further development allowed). There is active
development in the 2.0 and mainline branches. Plus, the developer
branch (the sandbox) is always open.
So, if this was my scenario, could I do something like this in the
read group dev_group //depot/...
write group dev_group //depot/product/branches/2.0/...
write group dev_group //depot/product/branches/mainline/...
write group dev_group //depot/product/branches/developer/...
super group adm_group //depot/...
Wouldn't this basically say that the only places that the dev group
could make saves to are the "active" branches and the sandbox?
Therefore, for my administration, once a branch becomes inactive, I
remove it from the protections table. Once a new branch gets created by
the admin, in order to allow developers to add to it, I add that "write"
line to the table.
Will this work? Does this make sense? If this does work, then it would
be simpler to implement and maintain then triggers.
Thanks again to those who've already given suggestions.
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Jay Glanville
Sent: June 9, 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