+ All Categories
Home > Technology > Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Date post: 17-May-2015
Category:
Upload: atlassian
View: 3,219 times
Download: 1 times
Share this document with a friend
Description:
Distributed Version Control Systems in the Enterprise Justen Stepka, Atlassian
Popular Tags:
31
1 1
Transcript
Page 1: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

11

Page 2: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

in the Enterprise

Distributed Version Control (DVCS)

Justen Stepka, Atlassian

22

Page 3: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Agenda• What is DVCS?

• Migration case study

• Atlassian and DVCS

33

Page 4: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

What is DVCS?

44

Page 5: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 6: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

VCS deployments

6

Push  /  Pull

Pull

CheckoutAdd

RemoveUpdateLog

CommitMergeBob

Alice

RemoteCentral  Repos.

Bamboo

6

Page 7: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 8: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

DVCS deployments

8

Bamboo

Push  /  Pull

Pull

Push

Push  /  Pull

Pull

AddRemoveUpdateLog

CommitDiff

MergeBob

Alice

Bob’sRepos.

Alice’sRepos.

Master  Repos.

CustomBuilds

8

Page 9: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 10: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Git or Mercurial?

1010

Page 11: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 12: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 13: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Whoʼs using what?

13

Mercurial Git

Adium Android

Python jQuery

OpenJDK Linux  Kernel

OpenOffice.org Perl

Netbeans Ruby  on  Rails

Vim Wine

13

Page 14: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 15: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Migration Case Study

1515

Page 16: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

What DVCS should you use?

1616

Page 17: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 18: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 19: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Key reasons for moving to Mercurial1. Tool and platform support is better

2. Learning curve - the existing command structure mirrors Subversion

1919

Page 20: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

How much code are we talking about?

2020

Page 21: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 22: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 23: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

2323

Page 24: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 25: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 26: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

2626

Page 27: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

Atlassian and DVCS

2727

Page 28: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 29: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 30: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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

Page 31: Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010

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


Recommended