Single Release Scenario
The diagram above represents both the physical layout of the branches as well as their logical representation. The physical layout describes how the branches actually appear on your Team Foundation Server Source Control view, while the logical view represents their inter-relationships. These relationships represent how these branches were created – the arrows point to the child branch in a parent child relationship. Code promotion – which is accomplished by merging as we described earlier - happens along the relationship path established by the parentage. Team Foundation Server’s merge functionality supports a bi-directional merge along these promotion paths.
Let’s describe the typical workflow of the development activity staged in these branches.
- Code for features and bug fixes is developed in the DEV branch.
- At significant milestones and upon meeting some well-defined quality criteria, code gets merged into MAIN. If MAIN doesn’t exist, we create MAIN by branching it from $/MyProduct/DEV based on some known state - a label, a given date, a changeset, etc.
- Code in MAIN gets stabilized for release criteria such as feature completeness, security and performance.
- Code is merged into PRODUCTION from MAIN for release when the quality is high enough for additional testing and the product is close to release-quality. If PRODUCTION doesn’t exist, we create PRODUCTION by branching it from $/MyProduct/MAIN based on some known state – label, date, etc.
- As each milestone gets promoted to the next branch or released, the given branch becomes open for the next milestone.
- We iterate on this cycle until we reach a quality bar established for release – at this point, a release (Release1.0) is declared from $/MyProduct/Production.
- We create a read-only Safekeeping branch under $/MyProduct/Safekeeping/Release1.0 from $/MyProduct/Production/Release1.0.
- At this point, $/MyProduct/DEV and $/MyProduct/MAIN become available for the next release (2.0) of the product, while $/MyProduct/PRODUCTION becomes available for sustained engineering of Release 1.0.