SlideShare a Scribd company logo
Distributed Source Control
      With Mercurial
Or, How I Learned to Stop Worrying and Love the Merge




       Ted Naleid - Lead Developer at Carol.com
Overview

•   Introduction
•   SVN (centralized VCS) vs DVCS
•   Current Popular DVCS Alternatives
•   Mercurial (hg) examples
•   Hands on with hg
checkout
      add
    remove
    update    remote
      log     central
    commit     repos
     merge
       ...


                        Build Server




Centralized VCS (SVN)
Alice's
                               repos
                   push
    add             pull
  remove
  update               push               Dave's
    log    Bob's        pull              repos
  commit   repos
    diff
                   push
   merge
                    pull
     ...                        build
                               repos



                                         Build Server




Distributed VCS (Mercurial)
SVN Limitations



DVCS/Mercurial Strengths
Branching is easy, but
     merging is painful


Branching is easy, merging is
     (relatively) easy
Active net connection
   required to interact


If your computer is on, you
have access to the repository
Unable to share changes
with others without sharing
      with everyone
       (including the build server)


   Sharing changes with
  selected people is easy
       (hg serve/hg push/hg pull)
Fails to merge changes when
    something is renamed


 Aware of file history and
can merge into renamed file
.svn files are littered
throughout your source tree


Single .hg directory at root
       of source tree
Slow over-the-wire
      performance


 Fast performance; you’re
working on local filesystem
Discourages experimentation



Cheap to create/throw away
 local experimental branch
SVN Strengths



DVCS/Mercurial
  Limitations
Familiar to most developers



Most developers will need
to learn to think differently
Relatively easy to grasp


Better understanding of
version control concepts
        required
Everyone knows where the
trunk is because there’s only
          one server

Need to define and adhere
 to convention to know
    where the trunk is
Well established tool
  support and integration


Tool support and integration
   isn’t quite as far along
There is a winner among
  free, centralized VCS
    systems: Subversion

DVCS systems are still new
and a clear winner has not
     been established
Popular 2nd Gen DVCS
        Systems
     Git - Bazaar - Mercurial
Git
Created by Linus Torvalds in 2005 after the BitKeeper “debacle”
Git - Website & Hosting

•   Website: http://git.or.cz/
•   Hosting:
    •   http://github.com
    •   http://repo.or.cz
Git - Use in the Wild

•   Linux Kernel
•   One Laptop Per Child (OLPC)
•   Ruby on Rails
•   Lots of other Ruby stuff
•   Written mostly in C
Git - Common Wisdom
•   Fastest of the DVCS systems
•   Unfriendly to non-Linux/Unix systems
•   Complex, with ~150 commands added to path
•   Very popular in the Linux/Ruby communities
•   Probably the most “buzz” off all DVCS systems right
    now
Bazaar (bzr)
Created by Canonical, Ltd. (creators of Ubuntu) in 2005
Bazaar - Website & Hosting


•   Website: http://bazaar-vcs.org/
•   Hosting: https://launchpad.net/
Bazaar - Use in the Wild

•   Ubuntu
•   Drupal
•   Fairly big in Python community
    •   it’s written mostly in Python
Bazaar - Common Wisdom
•   Has gone through lots of revisions/changed formats
•   Slowest of the 3
•   Migration of an existing SVN repository is REALLY
    slow
•   Made to be friendly, similar to SVN
•   Smallest market share
Mercurial (hg)
Created by Matt Mackall in 2005 after the BitKeeper “debacle”
Mercurial - Website &
              Hosting
•   Website: http://www.selenic.com/mercurial/
•   Hosting:
    •   http://freehg.org/
    •   http://sharesource.org/
Mercurial - Use in the Wild
•   OpenJDK (Java)
•   OpenSolaris
•   Mozilla
•   NetBeans
•   Many others (largely Java/Python related)
    •   Like Bazaar, it’s mostly written in Python
Mercurial - Common Wisdom
 •   Similar syntax to SVN
 •   Slightly slower than Git, but faster than Bazaar
 •   Good cross-platform support
 •   Getting good support from large Java projects
     (OpenJDK, NetBeans, etc)
 •   Lower maintenance and easier learning curve than
     Git
Why did I choose
Mercurial over Git/Bazaar?
Similar commands to SVN
•   hg add
•   hg remove
•   hg update
•   hg log
•   hg status
•   It’s like SVN but with the ability to “push” and “pull”
Better cross platform support
and growing tool integration
No “packing” of the
repository is necessary
Local revision numbers are
        “friendly”
It’s used by a number of big
         Java projects
It’s the first one I tried :)
All 3 of these tools look
        fantastic.
Mercurial Usage Examples
        How do I do X?
portal/**                  portal/.hg

                hg init
  local                        local
   file       hg addremove
                              repos
 system       hg commit




Create a new repository
portal/**                      portal/.hg                       http://hg01/repos/portal


   local     creates tip files      local                                   remote
    file                                              hg clone
              on filesystem        repos                                     repos
  system
                                             hg clone http://hg01/repos/portal




“Checkout” an Existing Repository
portal/**                     portal/.hg             http://hg01/repos/portal

 local                                        hg pull
                                 local                       remote
  file
            hg update           repos                         repos
system

              quot;hg pull -uquot; will do this in one command




   Pull down the latest changes
                (no conflicts with local changes)
local file changes
                                     portal/.hg                         http://hg01/repos/portal
                hg commit
                   conflict!                                   hg pull
  local       files unchanged!    hg update
                                                   local                        remote
   file                  hg merge                  repos                          repos
 system
                       hg commit
                                quot;hg fetchquot; will pull->update->merge->commit in one command




       Pull down the latest changes
                      (conflicts detected with local changes)
local file changes
                                      portal/.hg           http://hg01/repos/portal
                       hg add
     local            hg remove
                    hg addremove         local                     remote
      file                                                           repos
                     hg commit          repos
    system
                                                    hg push




Push changes to another repository
         (by default, push will refuse to run if it would require a merge)
http://hg01/repos/portal
portal/.hg

             hg incoming           remote
  local
                                    repos
 repos       hg outgoing




Do a push/pull dry run
portal/.hg


                                           local
        Branching is done by              repos
     simply cloning a repository                            hg clone
                                                     hg clone portal portal-clone
portal-clone/**                      portal-clone/.hg

    local         creates tip files         local
     file           on filesystem           repos
   system




   Create a new “branch”
             (experimenting is cheap and easy)
local file changes
                                     portal/.hg

     local               hg diff
      file              hg status        local
    system             hg identify     repos




Compare file system with repository
portal/.hg
     hg log
  hg annotate
     hg cat         local
    hg grep        repos
   hg serve




Query repository for info
Hands on with Hg
Creating new repository
Cloning repository/
    branching
Pushing changes to another
        repository
Merging conflicting changes
Creating a tag
Searching through history
Viewing repository through
     a web browser
A quick way to stick your toes in
       and try Mercurial out:
use it as a “Super Client” for SVN
Web Resources
•   Choosing a distributed version control system
          http://www.dribin.org/dave/blog/archives/2007/12/28/dvcs/

•   Understanding Mercurial
         http://www.selenic.com/mercurial/wiki/index.cgi/UnderstandingMercurial

•   Version Control and the “80%” (DVCS counterpoint)
         http://blog.red-bean.com/sussman/?p=79

•   Mercurial Book
         http://hgbook.red-bean.com/hgbook.html

•   Video of Bryan O’Sullivan (creator of the Mercurial Book)
         http://video.google.com/videoplay?docid=-7724296011317502612
Questions?

More Related Content

What's hot

Introduce to SVN
Introduce to SVNIntroduce to SVN
Introduce to SVN
Sitdhibong Laokok
 
Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real World
Tim Haak
 
Docker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing MeetupDocker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with Docker
Marc Campbell
 
Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Jérôme Petazzoni
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
CodeOps Technologies LLP
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
Adam Culp
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
Docker, Inc.
 
7 Ways to Optimize Hudson in Production
7 Ways to Optimize Hudson in Production7 Ways to Optimize Hudson in Production
7 Ways to Optimize Hudson in Production
CloudBees
 
Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015
Jérôme Petazzoni
 
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Lucas Jellema
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
Jérôme Petazzoni
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
dotCloud
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
Giacomo Vacca
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
Craig Smith
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
Larry Cai
 
Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environments
inside-BigData.com
 

What's hot (18)

Introduce to SVN
Introduce to SVNIntroduce to SVN
Introduce to SVN
 
Using Docker in the Real World
Using Docker in the Real WorldUsing Docker in the Real World
Using Docker in the Real World
 
Docker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing MeetupDocker Tips And Tricks at the Docker Beijing Meetup
Docker Tips And Tricks at the Docker Beijing Meetup
 
Solving Real World Production Problems with Docker
Solving Real World Production Problems with DockerSolving Real World Production Problems with Docker
Solving Real World Production Problems with Docker
 
Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16 What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
 
7 Ways to Optimize Hudson in Production
7 Ways to Optimize Hudson in Production7 Ways to Optimize Hudson in Production
7 Ways to Optimize Hudson in Production
 
Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015Containers: from development to production at DevNation 2015
Containers: from development to production at DevNation 2015
 
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
Java Developer Intro to Environment Management with Vagrant, Puppet, and Dock...
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
 
Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environments
 

Similar to Dvcs With Mercurial (No Notes)

The Source Control Landscape
The Source Control LandscapeThe Source Control Landscape
The Source Control LandscapeLorna Mitchell
 
Introduction of Google Code and Mercurial
Introduction of Google Code and MercurialIntroduction of Google Code and Mercurial
Introduction of Google Code and Mercurial
Fred Lin
 
Git 101 for CloudStack
Git 101 for CloudStackGit 101 for CloudStack
Git 101 for CloudStack
Sebastien Goasguen
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCS
Matthew McCullough
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCS
Matthew McCullough
 
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...Atlassian
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
PHPBelgium
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
Mangesh Bhujbal
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchelldpc
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVN
Lorna Mitchell
 
Shipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with DockerShipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with Docker
Jérôme Petazzoni
 
Git presentation
Git presentationGit presentation
Git presentation
James Cuzella
 
빈스톡 첫인상 with Git
빈스톡 첫인상 with Git빈스톡 첫인상 with Git
빈스톡 첫인상 with Git
AWSKRUG - AWS한국사용자모임
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
Ohad Raz
 
DockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times NewsroomDockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times Newsroom
Docker, Inc.
 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part I
Sergey Aganezov
 
Git
GitGit
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Git 101
Git 101Git 101

Similar to Dvcs With Mercurial (No Notes) (20)

The Source Control Landscape
The Source Control LandscapeThe Source Control Landscape
The Source Control Landscape
 
Introduction of Google Code and Mercurial
Introduction of Google Code and MercurialIntroduction of Google Code and Mercurial
Introduction of Google Code and Mercurial
 
Git 101 for CloudStack
Git 101 for CloudStackGit 101 for CloudStack
Git 101 for CloudStack
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCS
 
Git - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCSGit - Intro to the Basics of DVCS
Git - Intro to the Basics of DVCS
 
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...
AtlasCamp 2010: What is DVCS and why it will change the way we work - Jens Sc...
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVN
 
Shipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with DockerShipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with Docker
 
Git presentation
Git presentationGit presentation
Git presentation
 
빈스톡 첫인상 with Git
빈스톡 첫인상 with Git빈스톡 첫인상 with Git
빈스톡 첫인상 with Git
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
DockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times NewsroomDockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times Newsroom
 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part I
 
Git
GitGit
Git
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
Git 101
Git 101Git 101
Git 101
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 

Dvcs With Mercurial (No Notes)

  • 1. Distributed Source Control With Mercurial Or, How I Learned to Stop Worrying and Love the Merge Ted Naleid - Lead Developer at Carol.com
  • 2. Overview • Introduction • SVN (centralized VCS) vs DVCS • Current Popular DVCS Alternatives • Mercurial (hg) examples • Hands on with hg
  • 3. checkout add remove update remote log central commit repos merge ... Build Server Centralized VCS (SVN)
  • 4. Alice's repos push add pull remove update push Dave's log Bob's pull repos commit repos diff push merge pull ... build repos Build Server Distributed VCS (Mercurial)
  • 6. Branching is easy, but merging is painful Branching is easy, merging is (relatively) easy
  • 7. Active net connection required to interact If your computer is on, you have access to the repository
  • 8. Unable to share changes with others without sharing with everyone (including the build server) Sharing changes with selected people is easy (hg serve/hg push/hg pull)
  • 9. Fails to merge changes when something is renamed Aware of file history and can merge into renamed file
  • 10. .svn files are littered throughout your source tree Single .hg directory at root of source tree
  • 11. Slow over-the-wire performance Fast performance; you’re working on local filesystem
  • 12. Discourages experimentation Cheap to create/throw away local experimental branch
  • 14. Familiar to most developers Most developers will need to learn to think differently
  • 15. Relatively easy to grasp Better understanding of version control concepts required
  • 16. Everyone knows where the trunk is because there’s only one server Need to define and adhere to convention to know where the trunk is
  • 17. Well established tool support and integration Tool support and integration isn’t quite as far along
  • 18. There is a winner among free, centralized VCS systems: Subversion DVCS systems are still new and a clear winner has not been established
  • 19. Popular 2nd Gen DVCS Systems Git - Bazaar - Mercurial
  • 20. Git Created by Linus Torvalds in 2005 after the BitKeeper “debacle”
  • 21. Git - Website & Hosting • Website: http://git.or.cz/ • Hosting: • http://github.com • http://repo.or.cz
  • 22. Git - Use in the Wild • Linux Kernel • One Laptop Per Child (OLPC) • Ruby on Rails • Lots of other Ruby stuff • Written mostly in C
  • 23. Git - Common Wisdom • Fastest of the DVCS systems • Unfriendly to non-Linux/Unix systems • Complex, with ~150 commands added to path • Very popular in the Linux/Ruby communities • Probably the most “buzz” off all DVCS systems right now
  • 24. Bazaar (bzr) Created by Canonical, Ltd. (creators of Ubuntu) in 2005
  • 25. Bazaar - Website & Hosting • Website: http://bazaar-vcs.org/ • Hosting: https://launchpad.net/
  • 26. Bazaar - Use in the Wild • Ubuntu • Drupal • Fairly big in Python community • it’s written mostly in Python
  • 27. Bazaar - Common Wisdom • Has gone through lots of revisions/changed formats • Slowest of the 3 • Migration of an existing SVN repository is REALLY slow • Made to be friendly, similar to SVN • Smallest market share
  • 28. Mercurial (hg) Created by Matt Mackall in 2005 after the BitKeeper “debacle”
  • 29. Mercurial - Website & Hosting • Website: http://www.selenic.com/mercurial/ • Hosting: • http://freehg.org/ • http://sharesource.org/
  • 30. Mercurial - Use in the Wild • OpenJDK (Java) • OpenSolaris • Mozilla • NetBeans • Many others (largely Java/Python related) • Like Bazaar, it’s mostly written in Python
  • 31. Mercurial - Common Wisdom • Similar syntax to SVN • Slightly slower than Git, but faster than Bazaar • Good cross-platform support • Getting good support from large Java projects (OpenJDK, NetBeans, etc) • Lower maintenance and easier learning curve than Git
  • 32. Why did I choose Mercurial over Git/Bazaar?
  • 33. Similar commands to SVN • hg add • hg remove • hg update • hg log • hg status • It’s like SVN but with the ability to “push” and “pull”
  • 34. Better cross platform support and growing tool integration
  • 35. No “packing” of the repository is necessary
  • 36. Local revision numbers are “friendly”
  • 37. It’s used by a number of big Java projects
  • 38. It’s the first one I tried :)
  • 39. All 3 of these tools look fantastic.
  • 40. Mercurial Usage Examples How do I do X?
  • 41. portal/** portal/.hg hg init local local file hg addremove repos system hg commit Create a new repository
  • 42. portal/** portal/.hg http://hg01/repos/portal local creates tip files local remote file hg clone on filesystem repos repos system hg clone http://hg01/repos/portal “Checkout” an Existing Repository
  • 43. portal/** portal/.hg http://hg01/repos/portal local hg pull local remote file hg update repos repos system quot;hg pull -uquot; will do this in one command Pull down the latest changes (no conflicts with local changes)
  • 44. local file changes portal/.hg http://hg01/repos/portal hg commit conflict! hg pull local files unchanged! hg update local remote file hg merge repos repos system hg commit quot;hg fetchquot; will pull->update->merge->commit in one command Pull down the latest changes (conflicts detected with local changes)
  • 45. local file changes portal/.hg http://hg01/repos/portal hg add local hg remove hg addremove local remote file repos hg commit repos system hg push Push changes to another repository (by default, push will refuse to run if it would require a merge)
  • 46. http://hg01/repos/portal portal/.hg hg incoming remote local repos repos hg outgoing Do a push/pull dry run
  • 47. portal/.hg local Branching is done by repos simply cloning a repository hg clone hg clone portal portal-clone portal-clone/** portal-clone/.hg local creates tip files local file on filesystem repos system Create a new “branch” (experimenting is cheap and easy)
  • 48. local file changes portal/.hg local hg diff file hg status local system hg identify repos Compare file system with repository
  • 49. portal/.hg hg log hg annotate hg cat local hg grep repos hg serve Query repository for info
  • 53. Pushing changes to another repository
  • 58. A quick way to stick your toes in and try Mercurial out: use it as a “Super Client” for SVN
  • 59. Web Resources • Choosing a distributed version control system http://www.dribin.org/dave/blog/archives/2007/12/28/dvcs/ • Understanding Mercurial http://www.selenic.com/mercurial/wiki/index.cgi/UnderstandingMercurial • Version Control and the “80%” (DVCS counterpoint) http://blog.red-bean.com/sussman/?p=79 • Mercurial Book http://hgbook.red-bean.com/hgbook.html • Video of Bryan O’Sullivan (creator of the Mercurial Book) http://video.google.com/videoplay?docid=-7724296011317502612