1.23k likes | 1.48k Views
Best Practices for Advanced Source Control Beyond CheckOut and CheckIn. Steven Wilssens Compuware .NET Consultant http:// Steven.Wilssens .net. http:// www.visug.be. Visual Studio User Group Belgium. Community Meeting Point Evening Meeting s Each Month, starting March 2006 3 parts:
E N D
Best Practices for Advanced Source ControlBeyond CheckOut and CheckIn Steven Wilssens Compuware .NET Consultant http://Steven.Wilssens.net
Visual Studio User Group Belgium Community Meeting Point Evening Meetings Each Month, starting March 2006 3 parts: Round Table Formal practical covering Socializing part http://www.visug.be
Have you ever… Had a small part of the development team finishing a release, while the others were waiting Needed to support released versions Needed to develop multiple versions
Have you ever… Needed to prepare interim releases for testing Suffered from integration nightmares Suffered from source control contention
Goals After this session you will be able to: Identify different branching strategies Choose the appropriate branching strategy Increase overall product quality Increase overall process efficiency Apply the appropriate strategies with Team Foundation Source Control Start the implementation of continuousintegration
Content Branching strategies Branching terminology Reasons for branching Different branching strategies Guidelines on how to adopt the right branching strategy
Content Team Foundation Source Control Features How to implement a branching strategy Continuous integration SNAP
Contains: Entire source code Documentation files (optional) Anything else necessary to build and release a complete product (optional) It issequential and it only grows Branching TerminologyMainline/Trunk
Copy of another branch (or trunk) Taken at a certain time Contains new developments Grows independently of its parent Trunk is a special type of branch Branching TerminologyBranch
Merging Process of taking source files from one branch and applying them to another Branching TerminologyMerging
Moving changes from a child branch to the parent branch Branching TerminologyReverse Integration
Possible merge conflicts need to be solved on the Trunk Branching TerminologyReverse Integration
Build and unit/component/… test problems are discovered on the trunk! Branching TerminologyReverse Integration
Moving changes from a parent branch to a child branch Branching TerminologyForward Integration
Reasons for branching Primary reason for branching: If concurrent or parallel development must occur!
Reasons for branching Need to develop bugfixes/patches for a previous release(s) Need to support multiple released versions Need to develop multiple versions at the same time
Reasons for branching Need to prepare interim releases for testing Need to reduce source control contention Want your team to be productive during the testing phases of the SDLC
Branching Strategies Everything should be made as simple as possible, but not one bit simpler. Albert Einstein
Branching StrategiesBranch-by-Release Provides Series of successive baselines Common base for developers to use in making further changes to code Simple to use when only supporting 1 version Drawbacks Does not support long term parallel development (code chill phase) Added complexity and overhead to support of released versions Build-by-bug-number syndrome
Branching StrategiesBranch-by-Release Build-by-bug-number syndrome Occurs when code gets checked in a branch after the release :-( Who? Release Engineer Assignment? Hand pick only the pinpointed fixes and all bits of code needed When? Usually at the worst time -> an emergency release
Branching StrategiesBranch-by-Purpose Decision to branch is based on the need to satisfy a specific purpose: Release of software and associated items Typically mark significant milestones: Release for Alpha testing Release for Beta testing Release to QA for system testing Release to production Service Release
Branching StrategiesBranch-by-Purpose Drawbacks: More complex Code chill phase Advantages: Supports regular releases by design Supports emergency releases as required Avoids problems caused by build-by-bug-number syndrome Lets the developer work from the main branch
Branching StrategiesBridge Proceed with enhancements not intended for the release currently in progress Solution: Creation of bridge line Apply the enhancements Merge the bridge line back down into the main development line after the release candidate releases
Branching StrategiesBridge Lets multiple teams work on multiple subprojects in parallel Allows developers to modify code without impacting other developments