Why you should be using a distributed version control system
-
Upload
lenz-grimmer -
Category
Technology
-
view
3.334 -
download
1
description
Transcript of Why you should be using a distributed version control system
Why you should be using a Why you should be using a distributed version control system distributed version control system
(DVCS) for your project(DVCS) for your project
Lenz Grimmer <Lenz Grimmer <[email protected]>>
http://lenzg.net/ | Twitter: | Twitter: @lenzgr
2009-12-032009-12-03
SAPO Codebits | Lisbon | PortugalSAPO Codebits | Lisbon | Portugal
Agenda
● Disadvantages of the central approach
● DVCS Concepts and Advantages● Overview: Bazaar, git, Mercurial
$ whoami
1998 2002
2010?2008
Disadvantages of the centralized approach
(e.g. Subversion and CVS)
Most operations require communication with the central
repository
Checkpointing your work requires committing to the
central repository
Branching and merging considered painful
Collaboration is hampered
DVCS: Concepts and Advantages
There is no central instance(Well, duh!)
Disconnected operations
Local commits
Easy branching and merging
Multi-protocol support
Sample workflows
Solo Workflow
● Create project● Commit changes● Review/browse
history● Tag/publish release● Apply new changes● Rinse & Repeat
Hack
Pair programming
Create repository
Branch
HackHackCommit
Pull and merge
Commit
Developer A Developer B
Push, pull, merge
Code deployment
Upstreamproject
Live site
Developer
Branch
Hack
Commit
MergePush
Central Branch & Gatekeeper
Central repository Gatekeeper
Developer A Developer B
Branch, Merge,Pull
Edit, Commit,Push
Merge, ReviewPush
Edit, Commit,Push
Overview: Bazaar, git, Mercurial
Comparison aspects
● Usability differences● Project hosting sites● OS support● 3rd party tools (e.g. IDE integration, GUIs)● Plugins/Extensibility● Speed● Reference projects● Handling of branches and merges
Bazaar
● Python● Sponsored by Canonical● Hosting Platforms: Launchpad | Sourceforge● Many plugins● One branch per directory – simplifies the UI● IDE/GUI support● Strong OS support (incl. Windows)● References: Debian apt, awn, Gnash,
MySQL, Ubuntu
git
● C | Perl | Shell● Originated from the Linux Kernel Community● Speed first, usability later● Powerful, but steeper learning curve● Multiple branches per directory● Platforms: Kenai, github, gitorious,
SourceForge● References: Linux Kernel, Ruby on Rails,
jQuery
Mercurial
● Python● Plugins● Platforms: Bitbucket, Google Code, Kenai● Multiple branches per directory (named
branches)● A „pull“ updates the repo, not the working
copy● References: NetBeans, OpenJDK,
OpenOffice, OpenSolaris, Python
Q & A
Questions, Comments?
Thank you!Lenz Grimmer <[email protected]>