03.13.13 WANDisco SVN Training: Advanced Branching & Merging

2,678
-1

Published on

Get more out of branching and merging in this one-hour, free online training course that will get you leveraging the full potential of Subversion's branching and merging functionality.

* Definition of concurrent development
* What is a branch?
* What triggers a branch?
* Types of merges
* How to do a merge

Presented by Mike Lester. Mike, a 33 year veteran of the software industry, has spent the past 26 years delivering consulting and training services for Subversion and other software configuration management systems. He has taught over 700 classes covering various aspects of implementing and using Subversion and other SCMs. Mike is currently WANdisco’s Director of Subversion Training.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,678
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
70
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • ....1 CLICK
  • ...1 CLICK
  • 1 click
  • ...3 CLICKS
  • 3 clicks
  • Do demo after
  • ...1 CLICK
  • 6 clicks
  • ...1 CLICK
  • ...1 CLICK
  • ...1 Click
  • 1 click
  • ...1 CLICK
  • 4 clicks
  • ...1 CLICK
  • 3 clicks
  • ...3 CLICKS
  • ...2 CLICKS
  • 03.13.13 WANDisco SVN Training: Advanced Branching & Merging

    1. 1. Advanced Branching andMerging PresenterWe will beginin a few moments Michael Lester Wandisco Director of Training
    2. 2. Advanced Branching andMerging
    3. 3. Outline  Definition of concurrent development  What is a branch  What triggers a branch  Not all branches require a merge  Branching Demonstration  Types of Merges  How to do a merge  Merge info  Merging Demonstration  Conclusions 3
    4. 4. This training is done with the latestTortoiseSVN Version http://www.wandisco.com/subversion/download
    5. 5. Concurrent Development Definition When the same code/project has multiple developers working at the same time. 5
    6. 6. Concurrent DevelopmentSubversion tools that support concurrent development Author identification Difference reporting Branching Merging Hook scripts 6
    7. 7. Who changed / created / deleted what 7
    8. 8. Who changed / created / deleted what Author information is available through svnlook command svnlook author -r 40 /var/svn/repos And statistics 8
    9. 9. What is a BranchThe basic concept of a branch: A line of development that exists independently of another lineA 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 9
    10. 10. Reasons for Branching • Releasing patches for systems already in production. • Preparing interim releases for testing and user evaluation. • Working on more than one major version of the same code-base. • Major changes require independent development 10
    11. 11. Release patches (bug-fix) Payroll application Rel 1.0 Trunk Rel 1.0 Trunk 11
    12. 12. 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 12
    13. 13. When NOT to branch • Small changes • From “TAGS” folder 13
    14. 14. Branching from working copy 14
    15. 15. 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 15
    16. 16. 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 16
    17. 17. How do you keep track of “What is the actual release” 17
    18. 18. Identifying Branches in Subversion 18
    19. 19. Deleting BranchesRemember: The directory (project) can always be recovered, but will not display in the list command unless a specific revision (53) is specified. 19
    20. 20. Merging in actionBug fix / concurrent development 20
    21. 21. Merging in action one two Now the branch three four changes 5 one six two Seven three Eight four five six Seven one eight twotwo While the trunk three four changes five six Seven7 eight 21
    22. 22. Merging in action – modification occurs After both commits mike-bigfix-01172011 Trunk 22
    23. 23. Merging in actionYou always start from a working folder mike-bigfix-01172011 23
    24. 24. Merging in action – changes are made one twotwo three four 5 six Seven7 eight 24
    25. 25. Merging in action – Commit to trunk 25
    26. 26. Merging in action – mergeinfo The property svn:mergeinfo is added automatically 26
    27. 27. Merging in action The revision numbers 9 – 11 are the starting and ending changes in the branch 27
    28. 28. Merge information You can view the branch information graphically 28
    29. 29. Merging in action – collision ahead one two22two Now the branch three four changes 5 one six two Seven three Eight four five six Seven one eight twotwo While the trunk three four changes five six Seven7 eight 29
    30. 30. Merging in action 30
    31. 31. Merging in action 31
    32. 32. Merging in action – Resolve the conflict Before you canyou a commit to do a Remember – do still have you must tell Subversion that the commit to update the repository conflicts have been resolved 32
    33. 33. Special merging situations – no change in trunk After branch changes bigfix-20311 11 12 13 14 7 8 9 Trunk Merge like normal svn:mergeinfo /payroll/bugfix-20311:11-14 Check out have to merge ? version Do I the trunk HEAD 33
    34. 34. Using the hidden menu to merge Shift/right click 34
    35. 35. Include merged revisions in Log Messages 35
    36. 36. Command line mergeinfo commandC:sourcenewFeature>svn mergeinfo c:sourcepayroll  --show-revs mergedr15r18C:sourcenewFeature>svn mergeinfo c:sourcepayroll  --show-revs eligibler21This can be used to show what hasbeen merged and what could be merged 36
    37. 37. CherrypickingThis refers to choosing onespecific changeset from abranch and replicating it to This fixed a buganother. reproducable in the trunk This added a new feature for a unique customer Custom Branch TRUNK 37
    38. 38. Cherrypicking How does the other branch find out about I It wasalogged as fixed bug in my the useful code? custom project bug fix 1655. Something about that probably exists in thesort”. “customer trunk. 38
    39. 39. Another reason for Log Messages How does the other branch find out about the useful code? 39
    40. 40. Searching for log messages 40
    41. 41. Merge from log messages 41
    42. 42. Conclusions 1. Practice 2. Practice 3. Add branching and merging to “Policies & Procedures” 4. Train staff 5. Revise your policies & Procedures 42
    43. 43. April 4th Subversion Administration Presenter Michael Lester April 18th Wandisco Director of Training Introduction to SmartSVNCopyright © 2013 WANdisco.com All rights reserved. 43
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×