Your SlideShare is downloading. ×
Distributed Versioning Tools, BeJUG 2010
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Distributed Versioning Tools, BeJUG 2010

2,761
views

Published on

These are the slides Louis Jacomet and myself (Jo Voordeckers) used in our presentation at BeJUG 2010-10-20

These are the slides Louis Jacomet and myself (Jo Voordeckers) used in our presentation at BeJUG 2010-10-20

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,761
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Craft In Development DVCS in practice JoVoordeckers jo.voordeckers@pursuit.be @jovoordeckers blog.pursuit.be Louis Jacomet ljacomet@gmail.com @ljacomet
  • 2. Craft In Development Agenda ‣ Why revision control ‣ DVCS explained ‣ Workflows and practices ‣ What DVCS bring ‣ DVCS Compared ‣ Tools & plugins ‣ Project hosting ‣ Q & A
  • 3. Craft In Development About: Louis Jacomet ‣ 2002 - 2009 - Consultant at Axen ‣ 2009 - Freelance at Craft In Development ‣ Relevant experiences: ‣ Banking 2005 - 2008 ‣ Migration of repository from Harvest to SVN => Happy Users! ‣ Administration of SVN, including branching and merging strategies ‣ Tried different ways of structuring workflow with branches, reviews, gates in a team of up to 30 developers where quality was an issue => Unhappy Admin in search of a better world ‣ Git user ( mostly in front of SVN) for about a year
  • 4. Craft In Development About: Jo Voordeckers ‣ 2002 .. 2005 - Partner at Imagine-IT ‣ 2006 .. 2007 - Senior Software Engineer at Dolmen ‣ 2007 .. 2008 - Technical Project Leader at Dolmen ‣ 2008 - Founded Pursuit Consulting ‣ Java and RIA development contracting & consultancy ‣ iPhone developer: 1 commercial app in the store ‣ User of Mercurial (6 months), SVN (3 years) and CVS (5 years) ‣ Speaker at: ‣ JavaOne, Devoxx, BeJUG, IT Works, SAI
  • 5. Craft In Development
  • 6. Craft In Development Why revision control ‣ Tracks history and evolution of software projects ‣ Recover from mistakes ‣ Work on multiple product versions in parallel (prod, features, ...) ‣ (Consistent file set) ‣ Synchronize with collaborators ‣ Backup ‣ Common versioning systems ‣ RCS, CVS, SVN ‣ ClearCase, Perforce, TeamFoundation Server
  • 7. Craft In Development http://hginit.com
  • 8. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 9. Craft In Development Checking out / Updating
  • 10. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 11. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 12. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 13. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 14. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 15. Craft In Development
  • 16. Craft In Development
  • 17. Craft In Development DVCS Explained http://atomiq.org/archives/2004/09/things_you_shouldnt_have_to_explain_to_your_kids.html/
  • 18. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 19. Craft In Development http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
  • 20. Craft In Development Changesets at the basis http://hginit.com http://petevidler.com/series/mercurial/
  • 21. Craft In Development Internally it looks like http://book.git-scm.com/
  • 22. Craft In Development Distributed http://hginit.com Feature A Repo Feature B Repo
  • 23. Craft In Development Collaborating: where is my commit? http://hginit.com
  • 24. Craft In Development http://hginit.com Collaborating: where is my commit?
  • 25. Craft In Development http://hginit.com Collaborating: where is my commit?
  • 26. Craft In Development http://hginit.com Collaborating: where is my commit?
  • 27. Craft In Development DVCS Sweet spot ‣ A lot faster (10 to 150x) ‣ Very scalable (developers and repo size) ‣ History searching and filtering ‣ Cheap branching, near-instant switching ‣ Effortless merges ‣ Works off-line ‣ As many backups as users (clones) from the central repository ‣ Flexible developer workflow ‣ (Import existing CVS, SVN, … repositories with entire history) ‣ (Metadata is stored in a single .hg or .git folder)
  • 28. Craft In Development Effortless merge merge ? Base File edited File moved
  • 29. Craft In Development Workflows and practices ‣ Or how you keep your sanity when you are not alone?
  • 30. Craft In Development Internal workflows ‣ Trunk for development or stable only? ‣ Feature branches ‣ Yes or No? ‣ Short or long lived? ‣ Multiple versions ‣ Tags only or branches and hot fixes standard? ‣ How to make sure a fix is everywhere? ‣ Commits ‣ Anyone anytime or reviews and green light?
  • 31. Craft In Development Firm and soft branches release 1 release 2 Trunk Feat A Feat A’ F i r m S o f t
  • 32. Craft In Development DVCS and workflows ‣ Internal workflows ‣ All supported ‣ Distributed workflows ‣ Personnal workflow ‣ Merge or rebase
  • 33. Craft In Development Distributed workflows Local Local Local Adapted from http://http://whygitisbetterthanx.com/ Central
  • 34. Craft In Development http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
  • 35. Craft In Development http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
  • 36. Craft In Development Distributed workflows Dictator Blessed Lieutenant Lieutenant Developer Developer Developer Developer Adapted from http://http://whygitisbetterthanx.com/
  • 37. Craft In Development Personal workflow ‣ Your choice ‣ Multiple options available ‣ Allows committing on parallel tasks isolated ‣ Commit is no longer public by default ‣ Choose what goes public ‣ Original workflow ‣ Sanitized workflow
  • 38. Craft In Development As before Hack, Commit, Hack Fetch Merge Push Hack, Commit, Hack
  • 39. Craft In Development Isolated H.,C.,H. M erge Branch Fetch Fetch Merge back H.,C.,H. Push
  • 40. Craft In Development Topic change H.,C.,H. M erge Branch Fetch H H.,C.,H. M erge Branch again Push
  • 41. Craft In Development Social coder H.,C.,H. Branch Fetch Offer patch Clean up Rebase Fetch H.,C.,H.
  • 42. Craft In Development Merge or rebase? http://blog.xebia.com/2010/09/20/git-workflow/
  • 43. Craft In Development Git vs Hg
  • 44. Craft In Development Git vs Hg Native code (faster) Python + native code Linux and MacOS supported msysgit or Cygwin on Windows All platforms easy server on Linux/MacOS server requires work on Windows “hg serve” allows serving from any platform easily GitX on Mac MacHG IntelliJ, (Eclipse), (Netbeans) Netbeans, Eclipse, IntelliJ 9
  • 45. Craft In Development Git vs Hg Infers rename/copy by history “hg copy”, “hg rename” Based on similarity of file content “hg addremove -s”, can also infer Very good SVN integration, incompatible with git sharing SVN integration Many commands, strange params Easier to learn, commands match SVN Terse manpage doc, improved over time Quality and modern docs Commits identified by SHA1 only Local human readable ID, global SHA1
  • 46. Craft In Development Git vs Hg Unlimited parents merge Only 2-way merge Periodic “git-gc” auto or on demand No maintenance Private branch namespace + mapping Shared branch namespace Private user makes public Public history by default Can destroy history on demand Immutable history, History usually still accessible except “hg rebase” Prune to fully delete, explicit
  • 47. Craft In Development Git staging area
  • 48. Craft In Development Project hosting ‣ Mercurial ‣ - http://bitbucket.org/ ‣ - http://code.google.com/hosting/ ‣ GIT ‣ - http://github.com/ ‣ - http://sourceforge.net/ (supports hg too)
  • 49. Craft In Development Finding a revision with bisect ‣ Binary search for a commit ‣ Can be scripted for a fully automated search
  • 50. Craft In Development Git as SVN front-end ‣ Fully clone a SVN repository - might take some time ‣ Full clone of a sub project inside the repository supported ‣ Init and fetch only part of history ‣ Take only a specific path (trunk, a branch, ...) ‣ Note: quite hard to fetch later earlier commits ‣ Daily work ‣ rebase to maintain linear history for commits pushed back ‣ Git does not track directories, so it will not send remove dirs to SVN ‣ enabled through --rmdir
  • 51. Craft In Development References ‣ Mercurial ‣ HG Intro - http://hginit.com/ ‣ Small project workflow - http://petevidler.com/series/mercurial/ ‣ HG book - http://hgbook.red-bean.com/ ‣ GIT ‣ GIT Community book - http://book.git-scm.com/ ‣ Pro GIT book - http://progit.org/ ‣ Google’s Analysis - http://code.google.com/p/support/wiki/DVCSAnalysis ‣ http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 52. Craft In Development