Perforce Directory Structure

This page is an overview of the PDS, which is captured fully in PDS Guide (P4Web).

Directory Levels
Branching Patterns
Branch Methods
Branch Diagrams
...fgs
...web
...toolkit

Directory Levels

Our PDS indicates the use of a product level and container level in the branch model. Directories below that are determined by the needs of the product. The basic structure is:
//<product>/<container>[/<version>]/<module>/...

For example, the fgs product's main line has two modules, src and doc, and is located at:

//fgs/main/src/...
//fgs/main/doc/...

Branching Patterns

Branching patterns determine what container levels are used, and the integration paths between these levels. The table below lists the branching patterns and directory container levels for our products.
Product Branching Patterns Container Levels Other SCM Areas
fgs Basic Maintenance
Basic Planned Development
main
dev
rel
sb
//fgs-bld and fgs-rel depots for builds and releases
web Standard Hosted live
main
latest
toolkit Organic Development
Customization
main
svcs
Uses libraries from //3rdparty depot

Branch Methods

The two main types of branching methods are merge and promotion.

A regular merge, also called a merge down, is typically done from a more stable to a less stable branch. For example, we would merge down from //fgs/main/... to //fgs/dev/FGS218/... in order to pick up the latest bug fixes on main. Any resolves are started using p4 resolve -am. A merge may result in a conflicts.

A promotion is done when a less stable branch is fully tested and ready to be pushed to its more stable parent branch. The goal is to make the parent branch an exact copy of the less stable branch. For example, when work is stable on //fgs/dev/FGS218/..., we would promote it to //fgs/main/.... A last merge down is done immediately before a promotion. A promotion is done using p4 resolve -at, followed by a diff-driven merge to account for any divergence.

Selective integrations are special cases where a specific revision, or set of revisions, is cherry-picked. Selective integrations introduce complexity into the integration history, and should be avoided if possible.

Branch Diagrams

Putting this all together gives us the sample branch diagrams below.
Legend
main line
less stable branches
more stable branches
merge paths
promotion paths

fgs

Note that the sandbox branches do not have a defined relationship to other branches, and so are not shown in this diagram. Sandbox branches are located under //fgs/sb/....

web

toolkit