[p4] best way to prevent branching?

David Faison 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 *
//depot/[product]/branches/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...

e.g. 
	//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.

e.g.
	br-chk submit //depot/[product]/branches/..."br-chk.pl %user%"
	br-chk submit -//depot/[product]/branches/developers/... "..."

__________________________

David Faison
Photon Research Associates, Inc.

-----Original Message-----
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?

Hello all.

What's the best way to prevent users from creating branches in the wrong
area?

Now for the specifics ... we have a branching structure that looks like
this:
  //depot/[product]/branches/[branch_name]/...
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:
  //depot/[product]/branches/developers/[branch_name]/...

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
managers.)

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?

Thanks

JDG

---
Jay Dickon Glanville

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user




More information about the perforce-user mailing list