SlideShare a Scribd company logo
1 of 42
Branching Options for
Development
                        Presenter
  We will begin
  in a few moments

                        Michael Lester
                            Wandisco
                        Director of Training
Branching Options for
Development
Outline


           Definition of concurrent development
           What is a branch
           Different development models
           What triggers a branch
              Branching Demonstration
           Communication for branching and
            merging
           Conclusions




                                                   3
This training is done with the latest
TortoiseSVN Version




         http://www.wandisco.com/subversion/download
Non-Concurrent Development



            33     34     43    51




      Definition
       The easiest type of development.

        One person projects.




                                          5
Concurrent Development


                                    Branching



                     edit        Simultaneous
                                 Development


    Definition
     When the same code/project has multiple
     developers working at the same time.



                                                6
Concurrent Development

Subversion tools that support concurrent development


     Author identification

     Difference reporting

     Branching

     Merging

     Properties

     Hook scripts
                                                       7
What is a Branch



The basic concept of a branch:
          A line of development that exists
            independently of another line
A branch always begins life as a copy of something,
and moves on from there, generating its own history.


                                                    3rd branch
                                      1st branch
       Original line of development

                                                   2nd branch


                                                                 8
Branching from working copy




                              9
Branching from the repository




                                10
Different Development Models




             Branch nothing

           Branch everything

            Branch big things



                                11
“Branch nothing” development model


 Payroll application

             12        13   14          15



    Trunk
                                 edit




   Sometimes a checkout/commit cycle does not
   involve concurrent development



                                                12
“Branch nothing” development model


 Payroll application                    Tuesday
                                edit


        12       13      14             15        16



    Trunk              Monday

                                       edit
                                              Wednesday



   Sometimes a checkout/commit cycle does
   involve concurrent development



                                                          13
“Branch nothing” development model

 Payroll application      1st edit


                     14                15       16


     Trunk
                                     update

 Before the second
                                     2nd edit
 developer can
 commit, an update
 needs to happen                     update
                                      edit




                                                     14
Update issues


                               15

  Extra step may introduce
  • New bugs
                             update
  • Unclear code
  • Non-compilable
  • Non-testable             2nd edit

  • Update hesitation
                             update
                              edit




                                        15
Update issues

                             15           18             23




This can be a real         update      update      update
issue if lots of people
are working on the
                           2nd edit     3rd edit       4th edit
same files

                           update       update         update
                            edit         edit           edit



              Design issues may make this a problem.


                                                                  16
Update issues



     What may happen

        1. Users stop doing updates
        2. Users start doing updates badly




                                             17
Bug fix branch – merge or not decision

 Payroll application



   Trunk
                                         Merge bugfix
                                         back to trunk

            Rel 1.0    No Changes



   Rel 1.0 Bug Fix


                                                         18
The end of a bugfix

  Payroll application

          Rel 1.0       No Changes




   Rel 1.0 Bug Fix




         Rel 1.0 1      No Changes


                                     19
More bugfixes

  Payroll application

   tags/ Rel 1.0        No Changes


 branches/
  Rel 1.0 Bug Fix




  tags/ Rel 1.0 1       No Changes


  tags/ Rel 1.0 2       No Changes

                                     20
Release patches (bug-fix) – When to merge

  Payroll application

    Rel 1.0 Bug Fix




   Trunk


                 This could involve all
              changes to “Rel 1.0 Bug Fix”



                                             21
Release patches (bug-fix) – When to merge

   BankDocSystem

     Rel 1.0 Bug Fix




   Trunk


                  Or “cherry pick” specific
                changes in “Rel 1.0 Bug Fix”



                                               22
Release patches (bug-fix) – When to merge

      BankDocSystem
      Rel 1.0 Bug Fix
                                30              31




     Trunk
                          Rev 31
                          Not needed in trunk



                  Or “cherry pick” specific
                changes in “Rel 1.0 Bug Fix”



                                                     23
Bug fix merging notification – no automation

                    Trunk



      Rel 1.0 Bug Fix




                     Project management meetings
                     Email
                     Face-to-face


                                                    24
Merging notification – using SVN properties




1.   Set property
2.   Hook script emails correct developer
3.   Hook script updates project management system
4.   Changes property to “emailSent”

                                                     25
“Branch everything” development model

                          All developers work on
                         a branch related to a task

                          A bug        An enhancement




                         When bugs /
                         enhancements are
                         finished, they are
                         merged into the trunk




                                                        26
“Branch everything” development model


    Advantages
     •   All work isolated
     •   All work scheduled
     •   All work branched from stable trunk revision
     •   Small independent merges

     Disadvantages
     • Lots of branches
     • Lots of merges
     • Large overhead for some 1 character fixes



                                                        27
“Branch big things” development model


      All tasks categorized
                                        Classification is done
                                        by project leaders or in
       A branch                         team meetings.
                           Trunk
  contains a group
                      development for
   of related tasks
                        small things
  or enhancements                       Criteria
                                        • Scope
                                        • Interactions of
                                            bugs/enhancements
                                        • Need for testing
                                        • Time considerations




                                                                   28
“Branch big things” development model


                             All tasks categorized


                       A branch contains
                       a group of related
                            tasks or
                        enhancements




                           When development
                           branches are finished,
                           they are merged into
                           the trunk

                                                     29
“Branch big things” development model


                                 All tasks categorized


                                                 Trunk
         12       13      14          15     development
                                            for small things
 Trunk
                               edit


 Small development
 needs should be quick,
 relatively non-tested,
 and usually done by
 one person.
                                                               30
When to branch



  • Concurrent development
      • To isolate development
  • To create tag projects
      • Keep track of released code
  • Custom branch
      • Limited use
      • To test unapproved changes




                                      31
When NOT to branch




       • Small changes

       • From “TAGS” folder




                              32
Branching from the TAGS folder


  Pros and Cons


                            There is a bug in Rel 1.0
                            What do you do?
                           1. Create a bug fix branch
                           1. Create a bug fix branch
                           2. Fix the bug
                           3. Create another “release”
                                 tags folder branch
                                        Check
                                           out




                                 Commit            Edit




                                          Update




                                                          33
Extending the TAGS folder


  Pros and Cons


                             There is a bug in Rel 1.0
                             What do you do?
                            1. Checkout and Commit
                                 to the Rel1.0 branch


                                          Check
                                           out




                                 Commit            Edit




                                          Update




                                                          34
How do you keep track of
 “What is the actual release”




                                35
Identifying Branches in Subversion




                                     36
Identifying Branches in Subversion

  Remember, you can always see
  the svn:mergeinfo property




                                     37
Deleting Branches



Remember:
 The directory (project) can
 always be recovered, but will
 not display in the list
 command unless a specific
 revision (53) is specified.




                                 38
Finding Deleted Branches


Make it easy to find
 deleted branches.

 Use LOG messages




Move deleted branches
 to a “Deleted” folder.




                              39
Conclusions



      1. Practice
      2. Practice
      3. Add branching and merging to
         “Policies & Procedures”
      4. Train staff
      5. Revise your policies &
         Procedures



                                        40
Promotions and resources

    Free MultiSite Evaluation for
     Enterprises
                    o       Free for 7 days
                    o       No Risk
                    o       $12K value


    10% Off SmartSVN Professional
                     w/Discount Code
                            “SmartUpgrade10”
   To speak to a global software development specialist:   Stay connected:
                         sales@wandisco.com
                                                                        @WANdisco
                         925.380.1728
   Other questions?
                        info@wandisco.com                                linkedin.com/company/wandisco
                        925.380.1728


Copyright © 2010 WANdisco, Inc. All rights reserved.
Feb 28th
                                                   Getting Info
                                                 Out of Subversion

                                                    Presenter




                                                    March 14     th
                                                  Michael Lester
                                                     Advanced
                                                      Wandisco
                                                  Director of Training
                                                  Branching and
                                                      Merging

Copyright © 2012 WANdisco All rights reserved.                        42

More Related Content

Viewers also liked

Subversion client
Subversion clientSubversion client
Subversion client
rchakra
 
高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试
guest2bb065
 

Viewers also liked (20)

02.28.13 WANDisco SVN Training: Getting Info Out of SVN
02.28.13 WANDisco SVN Training: Getting Info Out of SVN02.28.13 WANDisco SVN Training: Getting Info Out of SVN
02.28.13 WANDisco SVN Training: Getting Info Out of SVN
 
Introduce to SVN
Introduce to SVNIntroduce to SVN
Introduce to SVN
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
WANdisco Subversion Support Services
WANdisco Subversion Support ServicesWANdisco Subversion Support Services
WANdisco Subversion Support Services
 
Subversion in 2010 and Beyond
Subversion in 2010 and BeyondSubversion in 2010 and Beyond
Subversion in 2010 and Beyond
 
Nature Spain
Nature SpainNature Spain
Nature Spain
 
Subversion Zen
Subversion ZenSubversion Zen
Subversion Zen
 
Make Subversion Agile
Make Subversion AgileMake Subversion Agile
Make Subversion Agile
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
 
Version controls for php project with visual svn server and tortoisesvn client
Version controls for php project with visual svn server and tortoisesvn clientVersion controls for php project with visual svn server and tortoisesvn client
Version controls for php project with visual svn server and tortoisesvn client
 
Tsvn17
Tsvn17Tsvn17
Tsvn17
 
Db2 tutorial
Db2 tutorialDb2 tutorial
Db2 tutorial
 
Rosettanet ppt
Rosettanet pptRosettanet ppt
Rosettanet ppt
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best Practices
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer Introduction
 
PHP Con09: SVN Advanced
PHP Con09: SVN AdvancedPHP Con09: SVN Advanced
PHP Con09: SVN Advanced
 
Subversion
SubversionSubversion
Subversion
 
Subversion client
Subversion clientSubversion client
Subversion client
 
高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试高级英语全国2008年10月高等教育自学考试
高级英语全国2008年10月高等教育自学考试
 

Similar to 02.19.13 WANDisco SVN Training: Branching Options for Development

The challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationThe challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automation
DBmaestro - Database DevOps
 
130511 stop wasting_your_time
130511 stop wasting_your_time130511 stop wasting_your_time
130511 stop wasting_your_time
Henning Blohm
 

Similar to 02.19.13 WANDisco SVN Training: Branching Options for Development (20)

Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
 
Git workflows
Git workflowsGit workflows
Git workflows
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control system
 
Agile & ALM tools
Agile & ALM toolsAgile & ALM tools
Agile & ALM tools
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)The Power Of Refactoring (PHPCon Italia)
The Power Of Refactoring (PHPCon Italia)
 
How to increase the ui performance of apps designed using react
How to increase the ui performance of apps designed using react How to increase the ui performance of apps designed using react
How to increase the ui performance of apps designed using react
 
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
Ad102 - Extreme Makeover -- LotusScript and Java Editor EditionAd102 - Extreme Makeover -- LotusScript and Java Editor Edition
Ad102 - Extreme Makeover -- LotusScript and Java Editor Edition
 
The challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automationThe challenges and pitfalls of database deployment automation
The challenges and pitfalls of database deployment automation
 
Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CD
 
Subversion Introduction
Subversion IntroductionSubversion Introduction
Subversion Introduction
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams
 
Automating the Quality
Automating the QualityAutomating the Quality
Automating the Quality
 
Continuous Integration With Jenkins
Continuous Integration With JenkinsContinuous Integration With Jenkins
Continuous Integration With Jenkins
 
130511 stop wasting_your_time
130511 stop wasting_your_time130511 stop wasting_your_time
130511 stop wasting_your_time
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
Accelerating DevOps at the SF DevOps MeetUp
Accelerating DevOps at the SF DevOps MeetUpAccelerating DevOps at the SF DevOps MeetUp
Accelerating DevOps at the SF DevOps MeetUp
 
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
 
SE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsSE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-Tools
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
 

More from WANdisco Plc

Hadoop scalability
Hadoop scalabilityHadoop scalability
Hadoop scalability
WANdisco Plc
 
02.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 201302.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 2013
WANdisco Plc
 

More from WANdisco Plc (9)

Supporting Financial Services with a More Flexible Approach to Big Data
Supporting Financial Services with a More Flexible Approach to Big DataSupporting Financial Services with a More Flexible Approach to Big Data
Supporting Financial Services with a More Flexible Approach to Big Data
 
Hadoop scalability
Hadoop scalabilityHadoop scalability
Hadoop scalability
 
Forrester On Using Subversion to Optimize Globally Distributed Development
Forrester On Using Subversion to Optimize Globally Distributed DevelopmentForrester On Using Subversion to Optimize Globally Distributed Development
Forrester On Using Subversion to Optimize Globally Distributed Development
 
02.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 201302.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 2013
 
Hadoop and WANdisco: The Future of Big Data
Hadoop and WANdisco: The Future of Big DataHadoop and WANdisco: The Future of Big Data
Hadoop and WANdisco: The Future of Big Data
 
uberSVN introduction by WANdisco
uberSVN introduction by WANdiscouberSVN introduction by WANdisco
uberSVN introduction by WANdisco
 
Why Svn
Why SvnWhy Svn
Why Svn
 
Forrester Research on Optimizing Globally Distributed Software Development Us...
Forrester Research on Optimizing Globally Distributed Software Development Us...Forrester Research on Optimizing Globally Distributed Software Development Us...
Forrester Research on Optimizing Globally Distributed Software Development Us...
 
Forrester Research on Globally Distributed Development Using Subversion
Forrester Research on Globally Distributed Development Using SubversionForrester Research on Globally Distributed Development Using Subversion
Forrester Research on Globally Distributed Development Using Subversion
 

02.19.13 WANDisco SVN Training: Branching Options for Development

  • 1. Branching Options for Development Presenter We will begin in a few moments Michael Lester Wandisco Director of Training
  • 3. Outline  Definition of concurrent development  What is a branch  Different development models  What triggers a branch  Branching Demonstration  Communication for branching and merging  Conclusions 3
  • 4. This training is done with the latest TortoiseSVN Version http://www.wandisco.com/subversion/download
  • 5. Non-Concurrent Development 33 34 43 51 Definition The easiest type of development. One person projects. 5
  • 6. Concurrent Development Branching edit Simultaneous Development Definition When the same code/project has multiple developers working at the same time. 6
  • 7. Concurrent Development Subversion tools that support concurrent development Author identification Difference reporting Branching Merging Properties Hook scripts 7
  • 8. What is a Branch The basic concept of a branch: A line of development that exists independently of another line A branch always begins life as a copy of something, and moves on from there, generating its own history. 3rd branch 1st branch Original line of development 2nd branch 8
  • 10. Branching from the repository 10
  • 11. Different Development Models Branch nothing Branch everything Branch big things 11
  • 12. “Branch nothing” development model Payroll application 12 13 14 15 Trunk edit Sometimes a checkout/commit cycle does not involve concurrent development 12
  • 13. “Branch nothing” development model Payroll application Tuesday edit 12 13 14 15 16 Trunk Monday edit Wednesday Sometimes a checkout/commit cycle does involve concurrent development 13
  • 14. “Branch nothing” development model Payroll application 1st edit 14 15 16 Trunk update Before the second 2nd edit developer can commit, an update needs to happen update edit 14
  • 15. Update issues 15 Extra step may introduce • New bugs update • Unclear code • Non-compilable • Non-testable 2nd edit • Update hesitation update edit 15
  • 16. Update issues 15 18 23 This can be a real update update update issue if lots of people are working on the 2nd edit 3rd edit 4th edit same files update update update edit edit edit Design issues may make this a problem. 16
  • 17. Update issues What may happen 1. Users stop doing updates 2. Users start doing updates badly 17
  • 18. Bug fix branch – merge or not decision Payroll application Trunk Merge bugfix back to trunk Rel 1.0 No Changes Rel 1.0 Bug Fix 18
  • 19. The end of a bugfix Payroll application Rel 1.0 No Changes Rel 1.0 Bug Fix Rel 1.0 1 No Changes 19
  • 20. More bugfixes Payroll application tags/ Rel 1.0 No Changes branches/ Rel 1.0 Bug Fix tags/ Rel 1.0 1 No Changes tags/ Rel 1.0 2 No Changes 20
  • 21. Release patches (bug-fix) – When to merge Payroll application Rel 1.0 Bug Fix Trunk This could involve all changes to “Rel 1.0 Bug Fix” 21
  • 22. Release patches (bug-fix) – When to merge BankDocSystem Rel 1.0 Bug Fix Trunk Or “cherry pick” specific changes in “Rel 1.0 Bug Fix” 22
  • 23. Release patches (bug-fix) – When to merge BankDocSystem Rel 1.0 Bug Fix 30 31 Trunk Rev 31 Not needed in trunk Or “cherry pick” specific changes in “Rel 1.0 Bug Fix” 23
  • 24. Bug fix merging notification – no automation Trunk Rel 1.0 Bug Fix  Project management meetings  Email  Face-to-face 24
  • 25. Merging notification – using SVN properties 1. Set property 2. Hook script emails correct developer 3. Hook script updates project management system 4. Changes property to “emailSent” 25
  • 26. “Branch everything” development model All developers work on a branch related to a task A bug An enhancement When bugs / enhancements are finished, they are merged into the trunk 26
  • 27. “Branch everything” development model Advantages • All work isolated • All work scheduled • All work branched from stable trunk revision • Small independent merges Disadvantages • Lots of branches • Lots of merges • Large overhead for some 1 character fixes 27
  • 28. “Branch big things” development model All tasks categorized Classification is done by project leaders or in A branch team meetings. Trunk contains a group development for of related tasks small things or enhancements Criteria • Scope • Interactions of bugs/enhancements • Need for testing • Time considerations 28
  • 29. “Branch big things” development model All tasks categorized A branch contains a group of related tasks or enhancements When development branches are finished, they are merged into the trunk 29
  • 30. “Branch big things” development model All tasks categorized Trunk 12 13 14 15 development for small things Trunk edit Small development needs should be quick, relatively non-tested, and usually done by one person. 30
  • 31. When to branch • Concurrent development • To isolate development • To create tag projects • Keep track of released code • Custom branch • Limited use • To test unapproved changes 31
  • 32. When NOT to branch • Small changes • From “TAGS” folder 32
  • 33. Branching from the TAGS folder Pros and Cons There is a bug in Rel 1.0 What do you do? 1. Create a bug fix branch 1. Create a bug fix branch 2. Fix the bug 3. Create another “release” tags folder branch Check out Commit Edit Update 33
  • 34. Extending the TAGS folder Pros and Cons There is a bug in Rel 1.0 What do you do? 1. Checkout and Commit to the Rel1.0 branch Check out Commit Edit Update 34
  • 35. How do you keep track of “What is the actual release” 35
  • 36. Identifying Branches in Subversion 36
  • 37. Identifying Branches in Subversion Remember, you can always see the svn:mergeinfo property 37
  • 38. Deleting Branches Remember: The directory (project) can always be recovered, but will not display in the list command unless a specific revision (53) is specified. 38
  • 39. Finding Deleted Branches Make it easy to find deleted branches. Use LOG messages Move deleted branches to a “Deleted” folder. 39
  • 40. Conclusions 1. Practice 2. Practice 3. Add branching and merging to “Policies & Procedures” 4. Train staff 5. Revise your policies & Procedures 40
  • 41. Promotions and resources  Free MultiSite Evaluation for Enterprises o Free for 7 days o No Risk o $12K value  10% Off SmartSVN Professional  w/Discount Code “SmartUpgrade10” To speak to a global software development specialist: Stay connected: sales@wandisco.com @WANdisco 925.380.1728 Other questions? info@wandisco.com linkedin.com/company/wandisco 925.380.1728 Copyright © 2010 WANdisco, Inc. All rights reserved.
  • 42. Feb 28th Getting Info Out of Subversion Presenter March 14 th Michael Lester Advanced Wandisco Director of Training Branching and Merging Copyright © 2012 WANdisco All rights reserved. 42

Editor's Notes

  1. 2 Clicks
  2. 1 Click
  3. 3 clicks
  4. 2 clicks
  5. Go to Demonstration
  6. 6 clicks
  7. 2 clicks
  8. 6 ClicksDotDotRel 1.02TagsbranchesNo Changes
  9. 5 ClicksFile shown is the last version in bug fix Not all changes needed in TRUNK
  10. 1 click
  11. 2 clicks
  12. ...1 CLICK
  13. ...3 CLICKS
  14. 3 clicks
  15. 1 click
  16. 3 clicks
  17. 2 clicksShow next webinar