[p4] Branching and ClientSpecs

Stephen Vance steve at vance.com
Fri Oct 19 06:42:54 PDT 2001


I'm weighing in with another opinion, but it's pretty much identical to 
Gareth's but less comprehensive.

At 11:07 AM 10/19/2001 +0200, Axelsson, Andreas wrote:

>Hi all!
>
>I've just figured out that I need to use branches and I'm trying to figure
>out how to best work with branches in perforce for our scenario:
>
>We have a Projects folder in the depot root, and under Projects there is a
>subfolder for each Product that we work on. For each Product, the sources
>are available directly, like this:
>
>+Projects
>   +Product
>     +PModule1
>     +PModule2
>
>When we want to make a version or milestone branch, which is the most
>favored way?
>
>+Projects
>   +Product
>     +PModule1
>     +PModule2
>     +V1.0
>       +PModule1
>       +PModule2
>
>...or...
>
>+Projects
>   +Product
>     +PModule1
>     +PModule2
>   +Product_v1.0
>     +PModule1
>     +PModule2
>
>...or should I've thought of this earlier and made it like this...
>
>+Projects
>   +Product
>     +Head
>       +PModule1
>       +PModule2
>     +V1.0
>       +PModule1
>       +PModule2

I prefer an approach like this third one.  Gareth's recommendation to have 
"release/X" is a good one.  You also may want to add a "dev" or "task" 
(since you already have used "project") directory to contain task- or 
developer-specific branches.

>Also, what's the preferred way of mapping this to the client. We're using
>devstudio on Windows for most of our development. Should one remove the
>version or head folder in the mapping and have everything go to the same
>root folder on the client, or should one create completely different roots
>and work as if the branch was a completely different set of files?
>
>Normal view:
>//depot/Projects/Product/... //client/Projects/Product/...
>
>Branch alternatives:
>//depot/Projects/Product/V1.0/... //client/Projects/Product/...
>
>//depot/Projects/Product_V1.0/... //client/Projects/Product_V1.0/...
>
>//depot/Projects/Product/V1.0/... //client/Projects/Product/V1.0/...
>
>//depot/Projects/Product/V1.0/...
>//client_with_new_root/Projects/Product/...
>
>Real life experiences, guides, pros and cons are appreciated.

I prefer the approach of editing the project files to use relative 
paths.  I've used it with good success.  Getting the developers into the 
habit of diffing the dsp and dsw files helps.  They're not as sensitive as 
MS wants you to believe.  I've even done some pretty hairy manual merges on 
them with little inconvenience.


Stephen Vance
mailto:steve at vance.com
http://www.vance.com/




More information about the perforce-user mailing list