SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Barcamp Scotland 2008
      Introduction to Mercurial
  How to improve your source control.

                           Tane Piper
                  digitalspaghetti@gmail.com

                     http://digitalspaghetti.me.uk
                     http://twitter.com/tanepiper


                        February 2nd, 2008




Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Introduction




  What Is Covered?
      A (Short) History of Source Control




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Introduction




  What Is Covered?
      A (Short) History of Source Control
      Distributed Source Control




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Introduction




  What Is Covered?
      A (Short) History of Source Control
      Distributed Source Control
      Mercurial itself




          Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Introduction




  What Is Covered?
      A (Short) History of Source Control
      Distributed Source Control
      Mercurial itself
      How to import your project




          Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Introduction




  What Is Covered?
      A (Short) History of Source Control
      Distributed Source Control
      Mercurial itself
      How to import your project
      Download from http://tinyurl.com/2spv4h




          Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control I




      SCCS (Source Code Control System)
      Marc Rochkind wrote at Bell Labs, in the early 1970s.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control I




      SCCS (Source Code Control System)
      Marc Rochkind wrote at Bell Labs, in the early 1970s.
      SCCS operated on individual files and every author had access
      to a shared workspace on a single system.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control I




      SCCS (Source Code Control System)
      Marc Rochkind wrote at Bell Labs, in the early 1970s.
      SCCS operated on individual files and every author had access
      to a shared workspace on a single system.
      It was common for people to lock files, and later forget to
      unlock them, preventing anyone else from modifying those
      files without the help of an administrator.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control II




      Dick Grune developed CVS (Concurrent Versions System).




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control II




      Dick Grune developed CVS (Concurrent Versions System).
      CVS let developers work simultaneously and somewhat
      independently in their own personal workspaces.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control II




      Dick Grune developed CVS (Concurrent Versions System).
      CVS let developers work simultaneously and somewhat
      independently in their own personal workspaces.
      They had to merge their edits prior to committing changes to
      the central repository.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control III



      In 2001 Jim Blandy and Karl Fogel developed Subversion.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control III



      In 2001 Jim Blandy and Karl Fogel developed Subversion.
      Subversion, does not stray from CVS’s centralised
      client/server model.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control III



      In 2001 Jim Blandy and Karl Fogel developed Subversion.
      Subversion, does not stray from CVS’s centralised
      client/server model.
      Added features such as multi-file atomic commits and better
      namespace management.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control III



      In 2001 Jim Blandy and Karl Fogel developed Subversion.
      Subversion, does not stray from CVS’s centralised
      client/server model.
      Added features such as multi-file atomic commits and better
      namespace management.
      At the same time Graydon Hoare was working on Monotone.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
A (Short) History of Source Control III



      In 2001 Jim Blandy and Karl Fogel developed Subversion.
      Subversion, does not stray from CVS’s centralised
      client/server model.
      Added features such as multi-file atomic commits and better
      namespace management.
      At the same time Graydon Hoare was working on Monotone.
      Featured cryptographic hashes as identifiers, and has an
      integral notion of ”trust” for code from different sources.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Distributed Version Control




                What is Distributed Version Control?




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Distributed Version Control (DVCS)




     Both git and Mercurial were announced in April 2005 to
     replace the withdrawal of free BitKeeper VC software, which
     was used to control the Linux kernel.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Distributed Version Control (DVCS)




     Both git and Mercurial were announced in April 2005 to
     replace the withdrawal of free BitKeeper VC software, which
     was used to control the Linux kernel.
     git developed by Linus Torvalds to manage the Linux kernel.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Distributed Version Control (DVCS)




     Both git and Mercurial were announced in April 2005 to
     replace the withdrawal of free BitKeeper VC software, which
     was used to control the Linux kernel.
     git developed by Linus Torvalds to manage the Linux kernel.
     Mercurial was also developed for kernel, but git won out.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
An Example of the DVCS Model




       Figure: An example of the Mercurial distributed model.


        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Simple description of the DVCS model




     No repository is king - no ”central” repository except for one
     agreed in a social fashion.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Simple description of the DVCS model




     No repository is king - no ”central” repository except for one
     agreed in a social fashion.
     Can be thought of as ”the bittorrent of the DVCS world”,
     compaired to CVS/SVN model which is akin to a FTP.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Simple description of the DVCS model




     No repository is king - no ”central” repository except for one
     agreed in a social fashion.
     Can be thought of as ”the bittorrent of the DVCS world”,
     compaired to CVS/SVN model which is akin to a FTP.
     Cloning repositories locally allows for more experimentation.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Simple description of the DVCS model




     No repository is king - no ”central” repository except for one
     agreed in a social fashion.
     Can be thought of as ”the bittorrent of the DVCS world”,
     compaired to CVS/SVN model which is akin to a FTP.
     Cloning repositories locally allows for more experimentation.
     As simple to set up as typing ’hg init’.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Itself



      Excellent support on Windows / Unix / MacOSX




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Itself



      Excellent support on Windows / Unix / MacOSX
      Tools such as TortoiseHG for Windows, QCT, Push Me Pull
      You, etc make usage easy.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Itself



      Excellent support on Windows / Unix / MacOSX
      Tools such as TortoiseHG for Windows, QCT, Push Me Pull
      You, etc make usage easy.
      Functionality can be added through an extension API with
      hooks (e.g. pre and post commit).




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Itself



      Excellent support on Windows / Unix / MacOSX
      Tools such as TortoiseHG for Windows, QCT, Push Me Pull
      You, etc make usage easy.
      Functionality can be added through an extension API with
      hooks (e.g. pre and post commit).
      Doesn’t pollute the namespace - keeps everything in one
      ’.hg’ directory.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Itself



      Excellent support on Windows / Unix / MacOSX
      Tools such as TortoiseHG for Windows, QCT, Push Me Pull
      You, etc make usage easy.
      Functionality can be added through an extension API with
      hooks (e.g. pre and post commit).
      Doesn’t pollute the namespace - keeps everything in one
      ’.hg’ directory.
      Provides it’s own web interface - hgweb (hgwebdir for a
      collection of repositories).




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands I




     ’hg init <name>’ - This initialises the local repository. You
     can do this command within the root folder too.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands I




     ’hg init <name>’ - This initialises the local repository. You
     can do this command within the root folder too.
     ’hg add’ - This will add any files within the directory
     structure to the local repository.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands I




     ’hg init <name>’ - This initialises the local repository. You
     can do this command within the root folder too.
     ’hg add’ - This will add any files within the directory
     structure to the local repository.
     ’hg commit’ - This will commit any changes to your local
     repository.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands I




     ’hg init <name>’ - This initialises the local repository. You
     can do this command within the root folder too.
     ’hg add’ - This will add any files within the directory
     structure to the local repository.
     ’hg commit’ - This will commit any changes to your local
     repository.
     ’hg push’ - This will push any changes to your repository.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands II



     ’hg pull’ - This will pull the content to your local
     repository from the remote repository set in the config file.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands II



     ’hg pull’ - This will pull the content to your local
     repository from the remote repository set in the config file.
     ’hg update’ - Updates and merges pulls to local repository
     where no heads are created (i.e. if you have made no local
     changes since your last pull).




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands II



     ’hg pull’ - This will pull the content to your local
     repository from the remote repository set in the config file.
     ’hg update’ - Updates and merges pulls to local repository
     where no heads are created (i.e. if you have made no local
     changes since your last pull).
     ’hg merge’ - This will merge any heads created by
     pushing/pulling from repositories.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Mercurial Commands II



     ’hg pull’ - This will pull the content to your local
     repository from the remote repository set in the config file.
     ’hg update’ - Updates and merges pulls to local repository
     where no heads are created (i.e. if you have made no local
     changes since your last pull).
     ’hg merge’ - This will merge any heads created by
     pushing/pulling from repositories.
     ’hg log’ - View a list of changesets.




        Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
How Mercurial Changesets Work




  Figure: A example of linear changesets. This is very common in
  repositories from one developer and once branch.




           Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Simultaneous Local Changesets




     Figure: Two local repositories with different changeset histories.




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Results of pulling a changeset into your local repository.




  Figure: Pulling a remote repository’s tip into your local repository creates
  2 heads. These need to be merged before you can continue.



           Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Results of merging heads.




  Figure: Merging the two heads together creates a new head. This can
  now be pushed or pulled to other repositories and merged with other
  heads.




           Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Thank you for listning.




      Check out more about Mercurial at http://tinyurl.com/3xphcz




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Thank you for listning.




      Check out more about Mercurial at http://tinyurl.com/3xphcz
      SHAMELESS PLUG - Follow the progress of Mercurial
      Frontend at http://digitalspaghetti.me.uk




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Thank you for listning.




      Check out more about Mercurial at http://tinyurl.com/3xphcz
      SHAMELESS PLUG - Follow the progress of Mercurial
      Frontend at http://digitalspaghetti.me.uk
      Comments welcome at digitalspaghetti@gmail.com




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial
Thank you for listning.




      Check out more about Mercurial at http://tinyurl.com/3xphcz
      SHAMELESS PLUG - Follow the progress of Mercurial
      Frontend at http://digitalspaghetti.me.uk
      Comments welcome at digitalspaghetti@gmail.com
      You can download these slides from
      http://hg.digitalspaghetti.me.uk/hgtalk




         Tane Piper digitalspaghetti@gmail.com   Introduction to Mercurial

Contenu connexe

Tendances

T3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surfT3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surfTobias Liebig
 
Git, from the beginning
Git, from the beginningGit, from the beginning
Git, from the beginningJames Aylett
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHuberr
 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / GithubPaige Bailey
 
2017 jenkins world
2017 jenkins world2017 jenkins world
2017 jenkins worldBrent Laster
 
Understanding and building Your Own Docker
Understanding and building Your Own DockerUnderstanding and building Your Own Docker
Understanding and building Your Own DockerMotiejus Jakštys
 
How to install & update R packages?
How to install & update R packages?How to install & update R packages?
How to install & update R packages?Rsquared Academy
 
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...OpenCity Community
 
TYPO3 Surf Introduction
TYPO3 Surf IntroductionTYPO3 Surf Introduction
TYPO3 Surf IntroductionHelmut Hummel
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Nils Adermann
 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your MasterNicola Paolucci
 
TYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CITYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CIderdanne
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git TutorialSage Sharp
 
Assign, Commit, and Review
Assign, Commit, and ReviewAssign, Commit, and Review
Assign, Commit, and ReviewZhongyue Luo
 

Tendances (20)

T3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surfT3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surf
 
Git, from the beginning
Git, from the beginningGit, from the beginning
Git, from the beginning
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / Github
 
2017 jenkins world
2017 jenkins world2017 jenkins world
2017 jenkins world
 
Understanding and building Your Own Docker
Understanding and building Your Own DockerUnderstanding and building Your Own Docker
Understanding and building Your Own Docker
 
F3X12 FLOW3 Project Lifecycle
F3X12 FLOW3 Project LifecycleF3X12 FLOW3 Project Lifecycle
F3X12 FLOW3 Project Lifecycle
 
How to install & update R packages?
How to install & update R packages?How to install & update R packages?
How to install & update R packages?
 
HTTP/3 in curl 2020
HTTP/3 in curl 2020HTTP/3 in curl 2020
HTTP/3 in curl 2020
 
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
 
TYPO3 Surf Introduction
TYPO3 Surf IntroductionTYPO3 Surf Introduction
TYPO3 Surf Introduction
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)
 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
 
TYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CITYPO3 CMS deployment with Jenkins CI
TYPO3 CMS deployment with Jenkins CI
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern Developer
 
Composer
ComposerComposer
Composer
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Assign, Commit, and Review
Assign, Commit, and ReviewAssign, Commit, and Review
Assign, Commit, and Review
 

Similaire à Introduction to Mercurial

How to start your open source project
How to start your open source projectHow to start your open source project
How to start your open source projectEslam Diaa
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control SystemsMihail Stoynov
 
Common primitives in Docker environments
Common primitives in Docker environmentsCommon primitives in Docker environments
Common primitives in Docker environmentsalexandru giurgiu
 
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
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationMassimo Menichinelli
 
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriThe Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriDocker, Inc.
 
Dependencies and Licenses
Dependencies and LicensesDependencies and Licenses
Dependencies and LicensesRobert Reiz
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowAll Things Open
 
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsBauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsStefan Scherer
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developersDmitry Guyvoronsky
 
The Source Control Landscape
The Source Control LandscapeThe Source Control Landscape
The Source Control LandscapeLorna Mitchell
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryMassimo Menichinelli
 
Git: The Lean, Mean, Distributed Machine
Git: The Lean, Mean, Distributed MachineGit: The Lean, Mean, Distributed Machine
Git: The Lean, Mean, Distributed Machineerr
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityWeaveworks
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Revelation Technologies
 

Similaire à Introduction to Mercurial (20)

How to start your open source project
How to start your open source projectHow to start your open source project
How to start your open source project
 
Distributed Version Control Systems
Distributed Version Control SystemsDistributed Version Control Systems
Distributed Version Control Systems
 
Common primitives in Docker environments
Common primitives in Docker environmentsCommon primitives in Docker environments
Common primitives in Docker environments
 
Mercurial presentation
Mercurial presentationMercurial presentation
Mercurial presentation
 
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...
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: Information
 
quality_forum
quality_forumquality_forum
quality_forum
 
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriThe Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
 
Dependencies and Licenses
Dependencies and LicensesDependencies and Licenses
Dependencies and Licenses
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
 
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsBauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 
The Source Control Landscape
The Source Control LandscapeThe Source Control Landscape
The Source Control Landscape
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
 
Git: The Lean, Mean, Distributed Machine
Git: The Lean, Mean, Distributed MachineGit: The Lean, Mean, Distributed Machine
Git: The Lean, Mean, Distributed Machine
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
 
Kubernetes 1001
Kubernetes 1001Kubernetes 1001
Kubernetes 1001
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
 

Dernier

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Introduction to Mercurial

  • 1. Barcamp Scotland 2008 Introduction to Mercurial How to improve your source control. Tane Piper digitalspaghetti@gmail.com http://digitalspaghetti.me.uk http://twitter.com/tanepiper February 2nd, 2008 Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 2. Introduction What Is Covered? A (Short) History of Source Control Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 3. Introduction What Is Covered? A (Short) History of Source Control Distributed Source Control Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 4. Introduction What Is Covered? A (Short) History of Source Control Distributed Source Control Mercurial itself Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 5. Introduction What Is Covered? A (Short) History of Source Control Distributed Source Control Mercurial itself How to import your project Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 6. Introduction What Is Covered? A (Short) History of Source Control Distributed Source Control Mercurial itself How to import your project Download from http://tinyurl.com/2spv4h Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 7. A (Short) History of Source Control I SCCS (Source Code Control System) Marc Rochkind wrote at Bell Labs, in the early 1970s. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 8. A (Short) History of Source Control I SCCS (Source Code Control System) Marc Rochkind wrote at Bell Labs, in the early 1970s. SCCS operated on individual files and every author had access to a shared workspace on a single system. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 9. A (Short) History of Source Control I SCCS (Source Code Control System) Marc Rochkind wrote at Bell Labs, in the early 1970s. SCCS operated on individual files and every author had access to a shared workspace on a single system. It was common for people to lock files, and later forget to unlock them, preventing anyone else from modifying those files without the help of an administrator. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 10. A (Short) History of Source Control II Dick Grune developed CVS (Concurrent Versions System). Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 11. A (Short) History of Source Control II Dick Grune developed CVS (Concurrent Versions System). CVS let developers work simultaneously and somewhat independently in their own personal workspaces. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 12. A (Short) History of Source Control II Dick Grune developed CVS (Concurrent Versions System). CVS let developers work simultaneously and somewhat independently in their own personal workspaces. They had to merge their edits prior to committing changes to the central repository. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 13. A (Short) History of Source Control III In 2001 Jim Blandy and Karl Fogel developed Subversion. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 14. A (Short) History of Source Control III In 2001 Jim Blandy and Karl Fogel developed Subversion. Subversion, does not stray from CVS’s centralised client/server model. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 15. A (Short) History of Source Control III In 2001 Jim Blandy and Karl Fogel developed Subversion. Subversion, does not stray from CVS’s centralised client/server model. Added features such as multi-file atomic commits and better namespace management. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 16. A (Short) History of Source Control III In 2001 Jim Blandy and Karl Fogel developed Subversion. Subversion, does not stray from CVS’s centralised client/server model. Added features such as multi-file atomic commits and better namespace management. At the same time Graydon Hoare was working on Monotone. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 17. A (Short) History of Source Control III In 2001 Jim Blandy and Karl Fogel developed Subversion. Subversion, does not stray from CVS’s centralised client/server model. Added features such as multi-file atomic commits and better namespace management. At the same time Graydon Hoare was working on Monotone. Featured cryptographic hashes as identifiers, and has an integral notion of ”trust” for code from different sources. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 18. Distributed Version Control What is Distributed Version Control? Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 19. Distributed Version Control (DVCS) Both git and Mercurial were announced in April 2005 to replace the withdrawal of free BitKeeper VC software, which was used to control the Linux kernel. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 20. Distributed Version Control (DVCS) Both git and Mercurial were announced in April 2005 to replace the withdrawal of free BitKeeper VC software, which was used to control the Linux kernel. git developed by Linus Torvalds to manage the Linux kernel. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 21. Distributed Version Control (DVCS) Both git and Mercurial were announced in April 2005 to replace the withdrawal of free BitKeeper VC software, which was used to control the Linux kernel. git developed by Linus Torvalds to manage the Linux kernel. Mercurial was also developed for kernel, but git won out. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 22. An Example of the DVCS Model Figure: An example of the Mercurial distributed model. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 23. Simple description of the DVCS model No repository is king - no ”central” repository except for one agreed in a social fashion. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 24. Simple description of the DVCS model No repository is king - no ”central” repository except for one agreed in a social fashion. Can be thought of as ”the bittorrent of the DVCS world”, compaired to CVS/SVN model which is akin to a FTP. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 25. Simple description of the DVCS model No repository is king - no ”central” repository except for one agreed in a social fashion. Can be thought of as ”the bittorrent of the DVCS world”, compaired to CVS/SVN model which is akin to a FTP. Cloning repositories locally allows for more experimentation. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 26. Simple description of the DVCS model No repository is king - no ”central” repository except for one agreed in a social fashion. Can be thought of as ”the bittorrent of the DVCS world”, compaired to CVS/SVN model which is akin to a FTP. Cloning repositories locally allows for more experimentation. As simple to set up as typing ’hg init’. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 27. Mercurial Itself Excellent support on Windows / Unix / MacOSX Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 28. Mercurial Itself Excellent support on Windows / Unix / MacOSX Tools such as TortoiseHG for Windows, QCT, Push Me Pull You, etc make usage easy. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 29. Mercurial Itself Excellent support on Windows / Unix / MacOSX Tools such as TortoiseHG for Windows, QCT, Push Me Pull You, etc make usage easy. Functionality can be added through an extension API with hooks (e.g. pre and post commit). Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 30. Mercurial Itself Excellent support on Windows / Unix / MacOSX Tools such as TortoiseHG for Windows, QCT, Push Me Pull You, etc make usage easy. Functionality can be added through an extension API with hooks (e.g. pre and post commit). Doesn’t pollute the namespace - keeps everything in one ’.hg’ directory. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 31. Mercurial Itself Excellent support on Windows / Unix / MacOSX Tools such as TortoiseHG for Windows, QCT, Push Me Pull You, etc make usage easy. Functionality can be added through an extension API with hooks (e.g. pre and post commit). Doesn’t pollute the namespace - keeps everything in one ’.hg’ directory. Provides it’s own web interface - hgweb (hgwebdir for a collection of repositories). Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 32. Mercurial Commands I ’hg init <name>’ - This initialises the local repository. You can do this command within the root folder too. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 33. Mercurial Commands I ’hg init <name>’ - This initialises the local repository. You can do this command within the root folder too. ’hg add’ - This will add any files within the directory structure to the local repository. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 34. Mercurial Commands I ’hg init <name>’ - This initialises the local repository. You can do this command within the root folder too. ’hg add’ - This will add any files within the directory structure to the local repository. ’hg commit’ - This will commit any changes to your local repository. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 35. Mercurial Commands I ’hg init <name>’ - This initialises the local repository. You can do this command within the root folder too. ’hg add’ - This will add any files within the directory structure to the local repository. ’hg commit’ - This will commit any changes to your local repository. ’hg push’ - This will push any changes to your repository. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 36. Mercurial Commands II ’hg pull’ - This will pull the content to your local repository from the remote repository set in the config file. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 37. Mercurial Commands II ’hg pull’ - This will pull the content to your local repository from the remote repository set in the config file. ’hg update’ - Updates and merges pulls to local repository where no heads are created (i.e. if you have made no local changes since your last pull). Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 38. Mercurial Commands II ’hg pull’ - This will pull the content to your local repository from the remote repository set in the config file. ’hg update’ - Updates and merges pulls to local repository where no heads are created (i.e. if you have made no local changes since your last pull). ’hg merge’ - This will merge any heads created by pushing/pulling from repositories. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 39. Mercurial Commands II ’hg pull’ - This will pull the content to your local repository from the remote repository set in the config file. ’hg update’ - Updates and merges pulls to local repository where no heads are created (i.e. if you have made no local changes since your last pull). ’hg merge’ - This will merge any heads created by pushing/pulling from repositories. ’hg log’ - View a list of changesets. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 40. How Mercurial Changesets Work Figure: A example of linear changesets. This is very common in repositories from one developer and once branch. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 41. Simultaneous Local Changesets Figure: Two local repositories with different changeset histories. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 42. Results of pulling a changeset into your local repository. Figure: Pulling a remote repository’s tip into your local repository creates 2 heads. These need to be merged before you can continue. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 43. Results of merging heads. Figure: Merging the two heads together creates a new head. This can now be pushed or pulled to other repositories and merged with other heads. Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 44. Thank you for listning. Check out more about Mercurial at http://tinyurl.com/3xphcz Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 45. Thank you for listning. Check out more about Mercurial at http://tinyurl.com/3xphcz SHAMELESS PLUG - Follow the progress of Mercurial Frontend at http://digitalspaghetti.me.uk Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 46. Thank you for listning. Check out more about Mercurial at http://tinyurl.com/3xphcz SHAMELESS PLUG - Follow the progress of Mercurial Frontend at http://digitalspaghetti.me.uk Comments welcome at digitalspaghetti@gmail.com Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial
  • 47. Thank you for listning. Check out more about Mercurial at http://tinyurl.com/3xphcz SHAMELESS PLUG - Follow the progress of Mercurial Frontend at http://digitalspaghetti.me.uk Comments welcome at digitalspaghetti@gmail.com You can download these slides from http://hg.digitalspaghetti.me.uk/hgtalk Tane Piper digitalspaghetti@gmail.com Introduction to Mercurial