Branching and Merging Practices Required SlideSESSION CODE: DPR303Jeff LevinsonSenior ALM ConsultantNorthwest Cadence
Branching And MergingAgendaWhat are we trying to solve?Basic branching patterns and scenariosBranch by ReleaseBranch by QualityBranch by FeatureSelecting patterns to meet business needs
What problems does branching solve?Know what code was releasedDon’t release code that isn’t readyAllow developers to experimentIndependent construction of featuresCode freezeBottom line… reduce risk
Branching Patterns
Branch By Release (Staircase)Maintain releases separatelyAllows for fairly easy promotion of fixes which effect multiple versionsEasy handling of test cycles and timingCan be used for single releases (as in a web application)Can be used for multiple releases (having to maintain multiple versions at the same time)DevelopmentTestProductionR1BranchOn TestR2BranchOn TestR3Branching / MergingpointDevelopmentLEGENDTestProduction
Branch By Release (Staircase)Handling bugsIntegration is always forwardDevelopmentTestProductionR1ForwardIntegrate asnecessaryForwardIntegrate asnecessaryBranchOn TestR2ForwardIntegrate asnecessaryBranchOn TestR3BranchOn TestBranching / MergingPoint R4DevelopmentLEGENDTestProduction
Staircase Thoughts
Branch by Release (Mainline)Effectively supports multiple concurrent releasesR1.1R1FI for ReleaseFI for ReleaseMainR2R2.1Branching / MergingpointRelease BranchLEGENDDevelopment
Mainline Thoughts
Branch by ReleaseDemo
Branch by QualityFlexibilitySupports the maximum number of scenariosMinimal number of branchesHandles complex situationsThough not always easilyNumerous variations to meet various needsProdFirmBranchQABranchSoftDev
Permanent HotfixBranch by Quality - VariationsSafekeepingProdR2R1BranchProdQABranchBranchQAHot FixBranchDevDev
Bug Found In TestStraightforward fix strategyVery easy, very quickProdRxBranchCode under testL1L1L2What happens if a bug then occurs in production?QAFIBranchRIHot FixDevR1R2Branching / MergingpointMultiple stepsdone as a singleunit of workLEGENDBranching / MergingPoint + LabelXBug found
Bug Found In ProductionFixed on QA BranchR1ProdR1Rollback to L2Code under testCode under testCode under testBranchL2L5L1L2L3L4QABranchDevD1D2R3R1R2When the rules don’t work – break themBut understand why!Branching / MergingpointMultiple stepsdone as a singleunit of workLEGENDBranching / MergingPoint + LabelXBug found
Branch by Quality thoughts
Branch by QualityDEMO
Branch By FeatureIsolate features for various reasonsLonger time to developWon’t fit in an iterationIndependent of other featuresAllows for release of features as readyNo dependency on when other features are readyProvides additional options on top of Branch by Quality pattern.PRODQADEVF1F2F3Branching / Merging pointMultiple stepsdone as a singleunit of workLEGEND
Branch by Feature Thoughts
Branch by FeatureDEMO
ScenariosWhat to consider when deciding on a strategyDiscussion
ScenariosWhat to consider when deciding on a strategyCustomer can’t make up mindBranch by Feature, but include test integration branchesConcurrent releases, not sure which feature in each releaseBranch by Release (mainline) + Branch by Feature Maintain only one release, short release (dev & test) cyclesBranch by QualityMaintain only one release, long release (dev & test) cyclesBranch by Release
Question & AnswerAny scenarios you want to discuss?
ResourcesRequired SlideLearningSessions On-Demand & CommunityMicrosoft Certification & Training Resourceswww.microsoft.com/techedwww.microsoft.com/learningResources for IT ProfessionalsResources for Developershttp://microsoft.com/technethttp://microsoft.com/msdn
Required SlideComplete an evaluation on CommNet and enter to win!
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31sthttp://northamerica.msteched.com/registration You can also register at the North America 2011 kiosk located at registrationJoin us in Atlanta next year
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Required Slide

Branching and Merging Practices

  • 1.
    Branching and MergingPractices Required SlideSESSION CODE: DPR303Jeff LevinsonSenior ALM ConsultantNorthwest Cadence
  • 2.
    Branching And MergingAgendaWhatare we trying to solve?Basic branching patterns and scenariosBranch by ReleaseBranch by QualityBranch by FeatureSelecting patterns to meet business needs
  • 3.
    What problems doesbranching solve?Know what code was releasedDon’t release code that isn’t readyAllow developers to experimentIndependent construction of featuresCode freezeBottom line… reduce risk
  • 4.
  • 5.
    Branch By Release(Staircase)Maintain releases separatelyAllows for fairly easy promotion of fixes which effect multiple versionsEasy handling of test cycles and timingCan be used for single releases (as in a web application)Can be used for multiple releases (having to maintain multiple versions at the same time)DevelopmentTestProductionR1BranchOn TestR2BranchOn TestR3Branching / MergingpointDevelopmentLEGENDTestProduction
  • 6.
    Branch By Release(Staircase)Handling bugsIntegration is always forwardDevelopmentTestProductionR1ForwardIntegrate asnecessaryForwardIntegrate asnecessaryBranchOn TestR2ForwardIntegrate asnecessaryBranchOn TestR3BranchOn TestBranching / MergingPoint R4DevelopmentLEGENDTestProduction
  • 7.
  • 8.
    Branch by Release(Mainline)Effectively supports multiple concurrent releasesR1.1R1FI for ReleaseFI for ReleaseMainR2R2.1Branching / MergingpointRelease BranchLEGENDDevelopment
  • 9.
  • 10.
  • 11.
    Branch by QualityFlexibilitySupportsthe maximum number of scenariosMinimal number of branchesHandles complex situationsThough not always easilyNumerous variations to meet various needsProdFirmBranchQABranchSoftDev
  • 12.
    Permanent HotfixBranch byQuality - VariationsSafekeepingProdR2R1BranchProdQABranchBranchQAHot FixBranchDevDev
  • 13.
    Bug Found InTestStraightforward fix strategyVery easy, very quickProdRxBranchCode under testL1L1L2What happens if a bug then occurs in production?QAFIBranchRIHot FixDevR1R2Branching / MergingpointMultiple stepsdone as a singleunit of workLEGENDBranching / MergingPoint + LabelXBug found
  • 14.
    Bug Found InProductionFixed on QA BranchR1ProdR1Rollback to L2Code under testCode under testCode under testBranchL2L5L1L2L3L4QABranchDevD1D2R3R1R2When the rules don’t work – break themBut understand why!Branching / MergingpointMultiple stepsdone as a singleunit of workLEGENDBranching / MergingPoint + LabelXBug found
  • 15.
  • 16.
  • 17.
    Branch By FeatureIsolatefeatures for various reasonsLonger time to developWon’t fit in an iterationIndependent of other featuresAllows for release of features as readyNo dependency on when other features are readyProvides additional options on top of Branch by Quality pattern.PRODQADEVF1F2F3Branching / Merging pointMultiple stepsdone as a singleunit of workLEGEND
  • 18.
  • 19.
  • 20.
    ScenariosWhat to considerwhen deciding on a strategyDiscussion
  • 21.
    ScenariosWhat to considerwhen deciding on a strategyCustomer can’t make up mindBranch by Feature, but include test integration branchesConcurrent releases, not sure which feature in each releaseBranch by Release (mainline) + Branch by Feature Maintain only one release, short release (dev & test) cyclesBranch by QualityMaintain only one release, long release (dev & test) cyclesBranch by Release
  • 22.
    Question & AnswerAnyscenarios you want to discuss?
  • 23.
    ResourcesRequired SlideLearningSessions On-Demand& CommunityMicrosoft Certification & Training Resourceswww.microsoft.com/techedwww.microsoft.com/learningResources for IT ProfessionalsResources for Developershttp://microsoft.com/technethttp://microsoft.com/msdn
  • 24.
    Required SlideComplete anevaluation on CommNet and enter to win!
  • 25.
    Sign up forTech·Ed 2011 and save $500 starting June 8 – June 31sthttp://northamerica.msteched.com/registration You can also register at the North America 2011 kiosk located at registrationJoin us in Atlanta next year
  • 26.
    © 2010 MicrosoftCorporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 27.