5. Version Control Systems
• Popular options • Common Problems
• CVS (1990) • Server or network downtimes
• Subversion(2000) • Distributed teams have network latency issues
• Perforce • Merging between branches is a PITA
• ClearCase
5
5
6. VCS deployments
Alice
ll
Pu
Checkout
/
sh
Add
Pu
Remove
Remote
Update
Central
Log
Commit
Repos.
Merge
Bob
Pull
Bamboo
6
6
7. Distributed Version Control (DVCS)
• Popular options • Benefits over VCS
• Git • Localized commits
• Mercurial • Full revision and branch history locally
• Bazaar • No server downtime
• BitKeeper (commercial)
7
7
8. DVCS deployments
Alice’s
Repos.
l
Alice
l
/
Pu
h
us
Pull
P
Add
Remove
Update
Log Bob’s Push
/
Pull Master
Commit Repos. Repos.
Diff
Merge
Bob
Pull
Pu
sh
Bamboo
Custom
Builds
8
8
9. VCS DVCS
Easy
branching Easy
Branching
Core
func9onality
-‐
tracks
your
merge
history,
even
Painful
merging
between
file
renames
Tool
support
kicks
ass Tool
support
varies
by
implementa9on
Experiment
with
local
commits
and
branches,
Requires
a
network
connec9on easily
rollback
changes.
Great
for
distributed
teams.
Authorita9ve
trunk
is
well
known
and
understood Authorita9ve
trunk
must
be
defined
and
enforced
9
9
11. Git
• Great for Linux / Mac
• Windows support is limited, but upcoming
• 150+ commands, complex for newbies
• Developed using C
• Used by many open-source projects
• GitHub - http://github.com
•
11
11
12. Mercurial
• Excellent support across all platforms
• An easier learning curve than Git - similar commands to Subversion
• Smaller community adoption
• Developed using Python - extendable
• BitBucket - http://www.bitbucket.org
•
12
12
13. Whoʼs using what?
Mercurial Git
Adium Android
Python jQuery
OpenJDK Linux
Kernel
OpenOffice.org Perl
Netbeans Ruby
on
Rails
Vim Wine
13
13
14. Desktop Tool Support
Tool Mercurial Git
Linux
Linux
Command
line
Mac
Mac
Windows
Windows
(cygwin)
IntelliJ
IDEA
Mul9ple
plugins
Na9ve
support
Eclipse
Mul9ple
plugins
Mul9ple
plugins
Visual
Studio VisualHG
(most
popular) Mul9ple
plugins
14
14
17. Personal preference
• “Mercurial is your smart friend who lies to explain things to you. Git is
your genius coworker who signs and rolls his eyes every time you ask
him a question.”
http://thebuild.com/blog/2009/11/04/git-vs-mercurial/
17
17
18. WTF is moving to Mercurial
Our Team, Website Task Force
• 1 dev in Sydney, 2 devs and a graphics designer in San Francisco
• 24 hour turn around on bugs, 48 hour turn around on copy changes
Larger projects run in parallel to daily updates
Problems with Subversion
• Maintaining multiple branches is a pain in the ass
• Overhead of maintaining branches complicates our ability to have a 24 / 48 hour turn
around
• Members of the Sydney team are far from the data, slow subversion
18
18
19. Key reasons for moving to Mercurial
1. Tool and platform support is better
2. Learning curve - the existing command structure mirrors Subversion
19
19
21. Migrating to Mercurial
• Mercurialʼs built in ConvertExtension
• Converts existing CVS and Subversion repositories into a Mercurial repository
• Mercurial hgsubversion extension
• Used to mirror and existing Subversion repository
• local (offline) commits
• Useful for experimenting
• Converts an existing Subversion repository into a Mercurial repository
21
21
22. ConvertExtension
• Built into Mercurial - needs to be enabled in your ~/.hgrc config
• Failed several times processing our Subversion repository
• Took ~31 hours to convert 370k lines of code
• Does not support the extraction of branch or tag information
22
22
24. hgsubversion extension
• Subversion closing utility
• Use Mercurial as a Subversion client
• Export your Subversion code to start a new
share Mercurial repository
• Exports all branch and tag information
• 2 hours to convert 370k lines of code
•
24
24
25. Exporting the code to
• Your can either setup your own server, or
• Experiment with BitBucket as your code hosting provider
• branching visualization
• user management
25
25
28. JIRA and DVCS
Integrate with FishEye
+ Alpha support for Mercurial with FishEye May 2010
Git support with FishEye 2.0 June 2009
JIRA FishEye
JIRA 4 and 4.1
+ Released in Sept 2007
Updated release June 2010, actively developed
JIRA Plugin
+
Released August 2009
JIRA 3.12 and 3.13
JIRA Plugin
28
28
29. Bamboo and DVCS
+
Dog-food testing internally
Expected in the next release, later this year
Bamboo Integration
Bamboo 2.2 - 2.5
+ Released March 2010
Bamboo GitHub Plugin
29
29
30. Wrap-up
DVCS is a shift in the way we use version control
• “Instead of asking what problems it solves, you should be asking what new
possibilities it offers”
• Git and Mercurial are emerging as the two main standards
• Atlassian is going to expand support for Git and Mercurial
• Several teams at Atlassian have, or are making the switch to Mercurial
• Subversion to DVCS bridges exist if youʼd like to experiment without
making the full switch
• If youʼre experimenting with Mercurial, use the hgsubversion extension
30
30