Your SlideShare is downloading. ×
0
DVCS: Making the Move?How Atlassian can help...Matthew WatsonFishEye/Crucible Team Lead, Atlassian                        ...
Why DVCS?• Lots of people excited by it• Huge in Open Source• But what about Commercial in-house development?• What about ...
What’s Great about DVCS?• Work offline• Easier branching and merging• Github and Bitbucket• Do we really need this?       ...
What’s really cool about DVCS!• What does ‘D’ in DVCS stand for?                                     5
What’s really cool about DVCS!• What does ‘D’ in DVCS stand for?• Distributed • Commit often, push when ready • Fast, peer...
What’s really cool about DVCS?• What should the ‘D’ in DVCS  stand for?                                 6
What’s really cool about DVCS?• What should the ‘D’ in DVCS  stand for?• DAG = Directed Acyclic Graph                     ...
SVN Commits Bob Mary Will        r38              7
SVN Commits              A.java Bob Mary Will        r38            r39                             7
SVN Commits              A.java Bob                             B.java Mary Will        r38            r39            r40 ...
SVN Commits              A.java Bob                             B.java Mary                                            C.j...
SVN Commits   Will   svn commit   svn update          A.java r38          B.java r38          C.java r41                  ...
SVN Commits   Will   svn commit   svn update          A.java r38      r39          B.java r38      r40          C.java r41...
DAG Commits 38:fb38fed187ab                   9
DAG Commits                        Bob 38:fb38fed187ab       A.java                   39:bb0760b60a8b                     ...
DAG Commits                        Bob 38:fb38fed187ab       A.java                   39:bb0760b60a8b                     ...
DAG Commits                        Bob 38:fb38fed187ab       A.java                   39:bb0760b60a8b                     ...
DAG Commits                        Bob 38:fb38fed187ab       A.java                   39:bb0760b60a8b                     ...
DAG Commits                        Bob 38:fb38fed187ab       A.java                   39:bb0760b60a8b                     ...
The Power of the DAG• Deterministic• Annotate/blame works!• Easy and powerful merges - Don’t be scared of long  running br...
Traceability• In SVN/CVS etc merges hide  what happened                                  Time• In DVCS, the DAG lets you s...
Flexibility• Single Integrator, Gatekeeper• Feature branches, git-flow• Clones• Automation• No central repository         ...
Workflows, Workflows, Workflows• Which workflow to use?• “With Great Power there must also come - Great  Responsibility!” ...
Feature Branching• Branching and merging cheap  and easy                                    Time• All feature work done on...
Feature Branching Workflow default       Time                             15
Feature Branching Workflow              Create Feature Branch                     FE-143FE-143 default       Time         ...
Feature Branching Workflow                Squash Bugs!FE-143 default       Time                               15
Feature Branching WorkflowFE-127                    Complete FE-127FE-143 default       Time                              ...
Feature Branching Workflow                   Merge latest from                 default, build, test andFE-127FE-143 defaul...
Feature Branching Workflow                    Merge to default, close                     JIRA, set fix versionFE-127FE-14...
Feature Branching WorkflowFE-127                        Stable code!FE-143 default       Time                             ...
Cross Branch Dependencies• Can merge to any downstream branch• Easily merge fixes for releases into  subsequent versions• ...
Migrating to DVCS• Which DVCS?• Small team - just go for it!• Large team - Don’t Fu$%! your devspeed!• Our goal - Zero dow...
Sync from SVN• Git SVN and HgSubversion • Incremental conversion• Remap Committers • mwatson = Matthew Watson <mwatson@atl...
Use Continuous Integration!• Vital part of dev cycle• Run same builds against old  and new VCS• Continuous Validation     ...
Use FishEye!• Sales Pitch• Commit Graph• See your commits in SVN  and DVCS                            20
Use Crucible!• Code reviews against  DVCS Commits• Developers get used  to the new way • New Commit ids • Committers map t...
Make the Switch• Setup Clones and IDE’s before hand• Make SVN read-only• Go DVCS!                                       22
DVCS is Awesome! • More power = more opportunity to do things faster! • The DAG gives traceability, powerful branching   a...
Questions• Our Blogs: http://blogs.atlassian.com/developer• Mercurial: http://mercurial.selenic.com/ • https://bitbucket.o...
Migrating to DVCS: Why You should do it and how Atlassian's tools can help
Migrating to DVCS: Why You should do it and how Atlassian's tools can help
Upcoming SlideShare
Loading in...5
×

Migrating to DVCS: Why You should do it and how Atlassian's tools can help

857

Published on

Presentation CB6 at the 2011 Atlassian Summit

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
857
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • &amp;#x201C;you might be thinking&amp;#x201D;\n
  • Intro: \nAdvantages of DVCS (git &amp; hg/mercurial) compared to Traditional VCS\nWhat we&amp;#x2019;ve learned about DVCS\nOptions for migrating and our migration\nEnd up thinking migrating to DVCS is awesome idea\nDrop nuggets along the way\n?What VCS&amp;#x2019;s using now?\n?Migrated? Thinking of Migrating?\n
  • Momentum\n
  • What do we know is good?\nWork Offline (local commits), easy to create new repo, faster\nEasier branching and merging &amp;#x201C;apparently&amp;#x201D;: Who branches in SVN?\nforks, pull request, OS stuff - new models\n
  • Distributed:\npush when you want - commit often\ncreate local repos, push to others\nfast, fast history\ndefine clones?\nclones or branches, more flexibility - new workflows (more later)\nNothing compelling yet?\n
  • * Important: This is what we discovered\n* SVN/CVS: Linear, concurrent changes\n* DAG: Commits built on parent commits - uniquely identified - new commits made by one author only - concurrent commits are merged\n* demonstrate\n
  • * Linear\n* Overlap unintentionally\n
  • * Linear\n* Overlap unintentionally\n
  • * Linear\n* Overlap unintentionally\n
  • Unintended state\nCI was invented to deal with this\n
  • Contrast to in SVN, changes made at same time, but appear as logical progression\nDVCS: Commits build on a known state\n
  • Contrast to in SVN, changes made at same time, but appear as logical progression\nDVCS: Commits build on a known state\n
  • Contrast to in SVN, changes made at same time, but appear as logical progression\nDVCS: Commits build on a known state\n
  • Contrast to in SVN, changes made at same time, but appear as logical progression\nDVCS: Commits build on a known state\n
  • Contrast to in SVN, changes made at same time, but appear as logical progression\nDVCS: Commits build on a known state\n
  • Lots of merges: yes, but deliberate, tracked, only merge a change once! \nMerging: very powerful - track copies/moves - long running refactoring\nCan &amp;#x201C;branch&amp;#x201D; at any point - each concurrent commit IS a branch - merge to any descendant\n\n
  • Graph Queries, 20% JIRA integration\nPause\n
  • distributed nature + DAG = lots of options\nNo-one tells you which one is best!\n\n
  • Stay with what you know - mimic SVN workflow\n get used to whats possible - devs will experiement\n adapt slowly\n\n
  • Us: Started using branching -&gt; release &amp; feature branching (all work on releases like this!)\nBranch from earliest common point you might want to merge to\n\n
  • Review-&gt;Build (BB3.1, 20% project)-&gt;complete merge/fixVersion &amp; close JIRA\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Review-&gt;Build (BB3.1, 20% project)\nFeature branch balance - size - life time - naturally evolve - big work - integrate from stable\n
  • Works for feature branches too\nDid this on SVN, but as mentioned already - merges only merge new stuff &amp; Traceability\nFeature Branches: can merge to others before integrated to stable\n\n
  • Options: All in one or gradual\n
  • Git SVN and HgSubversion allow you to work on a SVN repository using git/hg as a client - also used for converting\nCan pull at will - by setting up a cron job, can continuously pull changes into git/hg - then push them to your hosting service (github/bitbucket)\nCan also remap committer names, exclude file paths, more info on our blogs.\nMigrate any build/release/test processes that rely on the VCS\n\n
  • \n
  • RSS feeds of changes, activity streams, URL to changes, Search, Commit Graph\n Get Used to Commit hashes etc.\n
  • Start doing code reviews against synced DVCS\nDifferences\nEngage developers\n
  • we very happy, devs sceptical, but now all see benefits\n
  • Convinced you there is more to DVCS than you might have thought\n
  • * Slides will be available\n
  • Transcript of "Migrating to DVCS: Why You should do it and how Atlassian's tools can help"

    1. 1. DVCS: Making the Move?How Atlassian can help...Matthew WatsonFishEye/Crucible Team Lead, Atlassian 2
    2. 2. Why DVCS?• Lots of people excited by it• Huge in Open Source• But what about Commercial in-house development?• What about the costs of migrating? 3
    3. 3. What’s Great about DVCS?• Work offline• Easier branching and merging• Github and Bitbucket• Do we really need this? 4
    4. 4. What’s really cool about DVCS!• What does ‘D’ in DVCS stand for? 5
    5. 5. What’s really cool about DVCS!• What does ‘D’ in DVCS stand for?• Distributed • Commit often, push when ready • Fast, peer-to-peer, no central server • Flexibility: Clones vs Branches 5
    6. 6. What’s really cool about DVCS?• What should the ‘D’ in DVCS stand for? 6
    7. 7. What’s really cool about DVCS?• What should the ‘D’ in DVCS stand for?• DAG = Directed Acyclic Graph Time • No loops • Each commit has 1 or more parents • Commits uniquely identified 6
    8. 8. SVN Commits Bob Mary Will r38 7
    9. 9. SVN Commits A.java Bob Mary Will r38 r39 7
    10. 10. SVN Commits A.java Bob B.java Mary Will r38 r39 r40 7
    11. 11. SVN Commits A.java Bob B.java Mary C.java Will r38 r39 r40 r41 7
    12. 12. SVN Commits Will svn commit svn update A.java r38 B.java r38 C.java r41 8
    13. 13. SVN Commits Will svn commit svn update A.java r38 r39 B.java r38 r40 C.java r41 r41 8
    14. 14. DAG Commits 38:fb38fed187ab 9
    15. 15. DAG Commits Bob 38:fb38fed187ab A.java 39:bb0760b60a8b 9
    16. 16. DAG Commits Bob 38:fb38fed187ab A.java 39:bb0760b60a8b Mary B.java 40:d0f08ba891a0 9
    17. 17. DAG Commits Bob 38:fb38fed187ab A.java 39:bb0760b60a8b Mary B.java 40:d0f08ba891a0 Will C.java 41:38ff647618b5 9
    18. 18. DAG Commits Bob 38:fb38fed187ab A.java 39:bb0760b60a8b Mary B.java 40:d0f08ba891a0 42:7d0e20243949 Will C.java 41:38ff647618b5 9
    19. 19. DAG Commits Bob 38:fb38fed187ab A.java 39:bb0760b60a8b Mary B.java 40:d0f08ba891a0 42:7d0e20243949 Will C.java 41:38ff647618b5 43:5fcdd3657717 9
    20. 20. The Power of the DAG• Deterministic• Annotate/blame works!• Easy and powerful merges - Don’t be scared of long running branches!• Easy and powerful branching 10
    21. 21. Traceability• In SVN/CVS etc merges hide what happened Time• In DVCS, the DAG lets you see exactly what changed 11
    22. 22. Flexibility• Single Integrator, Gatekeeper• Feature branches, git-flow• Clones• Automation• No central repository 12
    23. 23. Workflows, Workflows, Workflows• Which workflow to use?• “With Great Power there must also come - Great Responsibility!” - Spider Man?• Take your time! 13
    24. 24. Feature Branching• Branching and merging cheap and easy Time• All feature work done on branch• Can merge to any descendant 14
    25. 25. Feature Branching Workflow default Time 15
    26. 26. Feature Branching Workflow Create Feature Branch FE-143FE-143 default Time 15
    27. 27. Feature Branching Workflow Squash Bugs!FE-143 default Time 15
    28. 28. Feature Branching WorkflowFE-127 Complete FE-127FE-143 default Time 15
    29. 29. Feature Branching Workflow Merge latest from default, build, test andFE-127FE-143 default Time 15
    30. 30. Feature Branching Workflow Merge to default, close JIRA, set fix versionFE-127FE-143 default Time 15
    31. 31. Feature Branching WorkflowFE-127 Stable code!FE-143 default Time 15
    32. 32. Cross Branch Dependencies• Can merge to any downstream branch• Easily merge fixes for releases into subsequent versions• Also works for feature branches• Our code is naturally becoming more stable 16
    33. 33. Migrating to DVCS• Which DVCS?• Small team - just go for it!• Large team - Don’t Fu$%! your devspeed!• Our goal - Zero downtime 17
    34. 34. Sync from SVN• Git SVN and HgSubversion • Incremental conversion• Remap Committers • mwatson = Matthew Watson <mwatson@atlassian.com>• Build Processes 18
    35. 35. Use Continuous Integration!• Vital part of dev cycle• Run same builds against old and new VCS• Continuous Validation 19
    36. 36. Use FishEye!• Sales Pitch• Commit Graph• See your commits in SVN and DVCS 20
    37. 37. Use Crucible!• Code reviews against DVCS Commits• Developers get used to the new way • New Commit ids • Committers map to Users 21
    38. 38. Make the Switch• Setup Clones and IDE’s before hand• Make SVN read-only• Go DVCS! 22
    39. 39. DVCS is Awesome! • More power = more opportunity to do things faster! • The DAG gives traceability, powerful branching and merging, speed • Migrating is easy! @mattw_watson #summit11 23
    40. 40. Questions• Our Blogs: http://blogs.atlassian.com/developer• Mercurial: http://mercurial.selenic.com/ • https://bitbucket.org/durin42/hgsubversion/overview/• Git: http://git-scm.com • http://www.kernel.org/pub/software/scm/git/docs/git-svn.html • http://john.albin.net/git/convert-subversion-to-git • http://nvie.com/posts/a-successful-git-branching-model/ 24
    1. A particular slide catching your eye?

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

    ×