Date post: | 17-May-2015 |
Category: |
Technology |
Upload: | atlassian |
View: | 3,219 times |
Download: | 1 times |
11
in the Enterprise
Distributed Version Control (DVCS)
Justen Stepka, Atlassian
22
Agenda• What is DVCS?
• Migration case study
• Atlassian and DVCS
33
What is DVCS?
44
Version Control Systems
5
• Popular options• CVS (1990)• Subversion(2000)• Perforce• ClearCase
• Common Problems• Server or network downtimes• Distributed teams have network latency issues• Merging between branches is a PITA
5
VCS deployments
6
Push / Pull
Pull
CheckoutAdd
RemoveUpdateLog
CommitMergeBob
Alice
RemoteCentral Repos.
Bamboo
6
Distributed Version Control (DVCS)• Popular options
• Git• Mercurial• Bazaar• BitKeeper (commercial)
7
• Benefits over VCS• Localized commits• Full revision and branch history locally• No server downtime
7
DVCS deployments
8
Bamboo
Push / Pull
Pull
Push
Push / Pull
Pull
AddRemoveUpdateLog
CommitDiff
MergeBob
Alice
Bob’sRepos.
Alice’sRepos.
Master Repos.
CustomBuilds
8
9
VCS DVCS
Easy branching Easy Branching
Painful mergingCore func9onality -‐ tracks your merge history, even
between file renames
Tool support kicks ass Tool support varies by implementa9on
Requires a network connec9onExperiment with local commits and branches, easily rollback changes. Great for distributed
teams.
Authorita9ve trunk is well known and understood Authorita9ve trunk must be defined and enforced
9
Git or Mercurial?
1010
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
•
1111
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
•
1212
Whoʼs using what?
13
Mercurial Git
Adium Android
Python jQuery
OpenJDK Linux Kernel
OpenOffice.org Perl
Netbeans Ruby on Rails
Vim Wine
13
Desktop Tool Support
14
Tool Mercurial Git
Command line Linux Mac
Windows
Linux Mac
Windows (cygwin)
IntelliJ IDEA Mul9ple plugins Na9ve support
Eclipse Mul9ple plugins Mul9ple plugins
Visual Studio VisualHG (most popular) Mul9ple plugins
14
Migration Case Study
1515
What DVCS should you use?
1616
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/
1717
WTF is moving to MercurialOur 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
1818
Key reasons for moving to Mercurial1. Tool and platform support is better
2. Learning curve - the existing command structure mirrors Subversion
1919
How much code are we talking about?
2020
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
2121
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
2222
2323
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
•
2424
Exporting the code to• Your can either setup your own server, or
• Experiment with BitBucket as your code hosting provider• branching visualization• user management
2525
2626
Atlassian and DVCS
2727
JIRA and DVCS
28
+Integrate with FishEyeAlpha support for Mercurial with FishEye May 2010Git support with FishEye 2.0 June 2009
JIRA FishEye
+JIRA 4 and 4.1Released in Sept 2007Updated release June 2010, actively developed
+ Released August 2009JIRA 3.12 and 3.13
Plugin
Plugin
JIRA
JIRA
28
Bamboo and DVCS
29
+ Dog-food testing internally Expected in the next release, later this year
+Bamboo 2.2 - 2.5Released March 2010
IntegrationBamboo
Bamboo GitHub Plugin
29
Wrap-upDVCS 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
3030
Resources• Hg Init: a Mercurial tutorial - http://hginit.com
• BitBucket - http://www.bitbucket.org
• Github - http://www.github.com
• hgsubversion - http://bitbucket.org/durin32/hgsubversion
3131