[p4] FW: Driving through hedges vs. intermediate branches

Brad Holt brad.holt at autodesk.com
Thu Feb 8 11:08:35 PST 2007


Hello All,

Apologies for the long mail.  Branch topology question here.  We've been
on p4 for years now, and so I have had the notion of "not driving though
hedges" drilled into me.  For those of you not familiar with the term, I
take it to mean you should not integrate between branches that are not
directly related to one another.

Our branching structure is becoming quite a bit more complex these days
though.  This has meant that in order to not drive through hedges, but
still enable us to have simultaneous releases trade fixes, that they
come off of an intermediate (what we are calling a "common") branch that
has come off of main.  Here's a lousy ASCII picture that I hope does not
get mangled by email.


                R1 ---------------->
                   |
common   |------------------------->
         |         |
         |    R1.5 ---------------->
         |
Main------------------------------->


R1.5 had to be taken before the R1 stabilization work so that they could
begin work on some new stuff for R1.5 (but could not go into R1).  So,
the only way I could find to enable early R1.5 work AND allow for it be
able to take R1 fixes made later on in an R1 release branch, was to
pre-create this common branch and take both R1 and R1.5 off of that.
Fair enough, and this is simple enough, but this is starting to happen
all over the place for every release, and developers are getting quite
confused.  Now when a developer makes a fix for R1, it requires 3
integrations just to propagate the fix around, and many do not see the
need or understand these annoying common branches.  Now with Perforce's
improved capacity for indirect merges, it is a pretty transparent
operation to integrate directly from one branch to another provided that
at some point they are in the same family tree.

While this improved indirect branching support has enabled more freedom
for integrations, I am also worried that it has made things a bit more
dangerous as it is now trickier to know what has been integrated into
where.  Back in the day when it was p4 made it tricky to indirectly
integrate, that worked as a gating factor for folks and would help
prevent them from integrating the wrong stuff to the wrong places.

Anyway, am I just being paranoid and stuck in my old ways?  Should I be
worried that adopting a more widespread indirect integration model will
lose some of our bookkeeping ability from branch to branch?

Do you all allow or encourage folks integrate around indirectly?
Do you still see merit in using these common branches to keep
integrations direct?
Is the simpler topology enabled by indirect integrations worth the risks
entailed by the R1->R1.5 integrations driving through a hedge?

    R1.5 -------------------------->
         |
         |   R1 ------------------------->
         |      |   
Main------------------------------->


While we're at it, what sort of processes do you employ to make sure
that developers are sending their stuff to the right places:branchspecs,
protections, policy?
Has anyone written a trigger that only allows integration operations
into the target that have been sourced from a particular approved path?
Do you have your users do their own integrations, or is someone
designated to take care of the en masse?

Anyway, kudos to you for wading through this mess.  I'd be interested in
any feedback you want to throw my way.

Thanks.

-brad



More information about the perforce-user mailing list