[p4] Guidelines for codelines?

Greg Whitfield Greg.Whitfield at lightworkdesign.com
Fri Nov 21 16:28:02 PST 2008

I think we are just getting into religious wars here, and so will have
to agree to differ. Mainline-only works in your circumstances - fine. In
mine it would just fail for a whole variety of reasons.

Products I work on also ship as source code. Having unfinished
functionality #ifdefed or in some other way conditionally disabled is
simply not acceptable to the end customer. Using such a technique also
assumes a C or C++ type language that easily facilitates such a
mechanism, and makes the further assumption that features are only
manifest by compilation of code. Many products have data, configuration
files, makefiles etc whose content is also affected by feature
development. So insulating these works far better in development
branches than having one big mainline.

You may also be in a shop that has speculative development - again, much
better done in a branch.

I can accept that some types of development may indeed be able to get
away with a mainline only approach, but by the same token many others
are greatly enhanced by use of a branched development strategy. I think
it is too sweeping a statement to sat that branches are a necessary evil
and thus dismiss them from your armoury.


More information about the perforce-user mailing list