Craft In Development
DVCS in practice
JoVoordeckers
jo.voordeckers@pursuit.be
@jovoordeckers
blog.pursuit.be
Louis Jacomet...
Craft In Development
Agenda
‣ Why revision control
‣ DVCS explained
‣ Workflows and practices
‣ What DVCS bring
‣ DVCS Comp...
Craft In Development
About: Louis Jacomet
‣ 2002 - 2009 - Consultant at Axen
‣ 2009 - Freelance at Craft In Development
‣ ...
Craft In Development
About: Jo Voordeckers
‣ 2002 .. 2005 - Partner at Imagine-IT
‣ 2006 .. 2007 - Senior Software Enginee...
Craft In Development
Craft In Development
Why revision control
‣ Tracks history and evolution of software projects
‣ Recover from mistakes
‣ Wo...
Craft In Development
http://hginit.com
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
Checking out / Updating
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
Craft In Development
Craft In Development
DVCS Explained
http://atomiq.org/archives/2004/09/things_you_shouldnt_have_to_explain_to_your_kids.ht...
Craft In Development
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Craft In Development
http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
Craft In Development
Changesets at the basis
http://hginit.com
http://petevidler.com/series/mercurial/
Craft In Development
Internally it looks like
http://book.git-scm.com/
Craft In Development
Distributed
http://hginit.com
Feature A Repo
Feature B Repo
Craft In Development
Collaborating: where is my commit?
http://hginit.com
Craft In Development
http://hginit.com
Collaborating: where is my commit?
Craft In Development
http://hginit.com
Collaborating: where is my commit?
Craft In Development
http://hginit.com
Collaborating: where is my commit?
Craft In Development
DVCS Sweet spot
‣ A lot faster (10 to 150x)
‣ Very scalable (developers and repo size)
‣ History sear...
Craft In Development
Effortless merge
merge ?
Base
File edited
File moved
Craft In Development
Workflows and practices
‣ Or how you keep your sanity when you are not alone?
Craft In Development
Internal workflows
‣ Trunk for development or stable only?
‣ Feature branches
‣ Yes or No?
‣ Short or ...
Craft In Development
Firm and soft branches
release 1
release 2
Trunk
Feat A
Feat A’
F
i
r
m
S
o
f
t
Craft In Development
DVCS and workflows
‣ Internal workflows
‣ All supported
‣ Distributed workflows
‣ Personnal workflow
‣ Me...
Craft In Development
Distributed workflows
Local Local Local
Adapted from http://http://whygitisbetterthanx.com/
Central
Craft In Development
http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
Craft In Development
http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
Craft In Development
Distributed workflows
Dictator Blessed
Lieutenant
Lieutenant
Developer Developer Developer Developer
A...
Craft In Development
Personal workflow
‣ Your choice
‣ Multiple options available
‣ Allows committing on parallel tasks iso...
Craft In Development
As before
Hack, Commit, Hack
Fetch
Merge
Push
Hack, Commit, Hack
Craft In Development
Isolated
H.,C.,H.
M
erge
Branch
Fetch Fetch
Merge
back H.,C.,H.
Push
Craft In Development
Topic change
H.,C.,H.
M
erge
Branch
Fetch
H
H.,C.,H.
M
erge
Branch
again
Push
Craft In Development
Social coder
H.,C.,H.
Branch
Fetch
Offer
patch
Clean up
Rebase
Fetch
H.,C.,H.
Craft In Development
Merge or rebase?
http://blog.xebia.com/2010/09/20/git-workflow/
Craft In Development
Git vs Hg
Craft In Development
Git vs Hg
Native code (faster) Python + native code
Linux and MacOS supported
msysgit or Cygwin on Wi...
Craft In Development
Git vs Hg
Infers rename/copy by history “hg copy”, “hg rename”
Based on similarity of file content “hg...
Craft In Development
Git vs Hg
Unlimited parents merge Only 2-way merge
Periodic “git-gc” auto or on demand No maintenance...
Craft In Development
Git staging area
Craft In Development
Project hosting
‣ Mercurial
‣ - http://bitbucket.org/
‣ - http://code.google.com/hosting/
‣ GIT
‣ - h...
Craft In Development
Finding a revision with bisect
‣ Binary search for a commit
‣ Can be scripted for a fully
automated s...
Craft In Development
Git as SVN front-end
‣ Fully clone a SVN repository - might take some time
‣ Full clone of a sub proj...
Craft In Development
References
‣ Mercurial
‣ HG Intro - http://hginit.com/
‣ Small project workflow - http://petevidler.co...
Craft In Development
Upcoming SlideShare
Loading in...5
×

Distributed Versioning Tools, BeJUG 2010

2,798

Published on

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,798
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Distributed Versioning Tools, BeJUG 2010

  1. 1. Craft In Development DVCS in practice JoVoordeckers jo.voordeckers@pursuit.be @jovoordeckers blog.pursuit.be Louis Jacomet ljacomet@gmail.com @ljacomet
  2. 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. 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. 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. 5. Craft In Development
  6. 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. 7. Craft In Development http://hginit.com
  8. 8. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  9. 9. Craft In Development Checking out / Updating
  10. 10. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  11. 11. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  12. 12. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  13. 13. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  14. 14. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  15. 15. Craft In Development
  16. 16. Craft In Development
  17. 17. Craft In Development DVCS Explained http://atomiq.org/archives/2004/09/things_you_shouldnt_have_to_explain_to_your_kids.html/
  18. 18. Craft In Development http://betterexplained.com/articles/a-visual-guide-to-version-control/
  19. 19. Craft In Development http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
  20. 20. Craft In Development Changesets at the basis http://hginit.com http://petevidler.com/series/mercurial/
  21. 21. Craft In Development Internally it looks like http://book.git-scm.com/
  22. 22. Craft In Development Distributed http://hginit.com Feature A Repo Feature B Repo
  23. 23. Craft In Development Collaborating: where is my commit? http://hginit.com
  24. 24. Craft In Development http://hginit.com Collaborating: where is my commit?
  25. 25. Craft In Development http://hginit.com Collaborating: where is my commit?
  26. 26. Craft In Development http://hginit.com Collaborating: where is my commit?
  27. 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. 28. Craft In Development Effortless merge merge ? Base File edited File moved
  29. 29. Craft In Development Workflows and practices ‣ Or how you keep your sanity when you are not alone?
  30. 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. 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. 32. Craft In Development DVCS and workflows ‣ Internal workflows ‣ All supported ‣ Distributed workflows ‣ Personnal workflow ‣ Merge or rebase
  33. 33. Craft In Development Distributed workflows Local Local Local Adapted from http://http://whygitisbetterthanx.com/ Central
  34. 34. Craft In Development http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
  35. 35. Craft In Development http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
  36. 36. Craft In Development Distributed workflows Dictator Blessed Lieutenant Lieutenant Developer Developer Developer Developer Adapted from http://http://whygitisbetterthanx.com/
  37. 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. 38. Craft In Development As before Hack, Commit, Hack Fetch Merge Push Hack, Commit, Hack
  39. 39. Craft In Development Isolated H.,C.,H. M erge Branch Fetch Fetch Merge back H.,C.,H. Push
  40. 40. Craft In Development Topic change H.,C.,H. M erge Branch Fetch H H.,C.,H. M erge Branch again Push
  41. 41. Craft In Development Social coder H.,C.,H. Branch Fetch Offer patch Clean up Rebase Fetch H.,C.,H.
  42. 42. Craft In Development Merge or rebase? http://blog.xebia.com/2010/09/20/git-workflow/
  43. 43. Craft In Development Git vs Hg
  44. 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. 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. 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. 47. Craft In Development Git staging area
  48. 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. 49. Craft In Development Finding a revision with bisect ‣ Binary search for a commit ‣ Can be scripted for a fully automated search
  50. 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. 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. 52. Craft In Development
  1. A particular slide catching your eye?

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

×