2 messages in com.perforce.perforce-user[p4] Branching methodology
FromSent OnAttachments
Axelsson, Andreas09 Aug 2001 00:49 
"Schaible, Jörg"09 Aug 2001 02:09 
Subject:[p4] Branching methodology
From:Axelsson, Andreas (Andr@dice.se)
Date:08/09/2001 12:49:05 AM
List:com.perforce.perforce-user

Hi all,

I've got a few questions about branching. Having worked for several years with VSS our development team hasn't been using branches very much and as we're planning to migrate to Perforce I've been investigating how to improve our development structure and branches look like a big leap forward. We work on pretty large projects (mainly using MS Visual C++ and gcc) that involve a lot of custom code not shared by other teams, but there are a few sections of code that is shared. The basic structure looks like this:

+-Shared +-Lib1 +-Lib2 +-Projects +-Project1 +-Module1 +-Module2 +-Shared +-Lib3 +-Lib4 +-Project2

Lib1 and Lib2 are shared and used by everyone. Module1 and Module2 are private project modules. Lib3 and Lib4 are developed with the intent of moving them to $\Shared when finished and if they end up useful for others.

Now to the questions: * How would one normally branch within Project1? Should one branch the whole project tree (rooted at Project1) and everything below, or just the specific Module or Lib? * Would one usually map the branch to the same folder as the main line, or does this differ depending on what choice one makes in the first question. * How would one's workspace mapping look after either choice if it normally looks like this:

//depot/Shared/... //client/Shared/... //depot/Projects/Project1/... //client/Projects/Project1/...

I can see that branching to a separate folder would cause problems with IDE workspaces and makefiles as paths would change, but when I've tried to map the branch to the same folder, it feels like it's easy to get confused about what files are where and how one should map the folders before/after branching and syncing.

I've read the white papers on the site and they rarely mention any of these things. Any help is appreciated.

Thank you! Andreas Axelsson