SlideShare una empresa de Scribd logo
1 de 35
Mercurial for Kittens Shuhei Takahashi<takahashi.shuhei@gmail.com>
Mercurial
Features Simple design Decentralized system High performance Extensible framework
Outline History model Basic operations
History model
Checking out Mercurial repo $ hg clone http://example.com/hg example updating to branch default 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ ls -lA example/ drwxr-xr-x 3 nya nya 4096 2011-05-22 20:59 .hg -rw-r--r-- 1 nya nya   14 2011-05-22 20:59 README drwxr-xr-x 2 nya nya 4096 2011-05-22 20:59 src
Standard Mercurial repo example/   .hg/   README src/     a.cc a.h Repository Working copy
Standard Mercurial repo example/   .hg/ hgrc dirstate     store/   ... repo-local config working copy state history
History .hg/ Merge X Improve X diff -r 000000... -r 39fca2... README --- /dev/null   Thu Jan 01 00:00:00 1970 +0000 +++ b/README    Sun May 22 20:59:40 2011 +0900 @@ -0,0 +1,1 @@ +Hello, world! Implemented X Implementing X Bugfix First commit
Commit nodeid: 9e66e5ae2b... rev: 42 branch: featureX author: "Shuhei Takahashi <nya@example.com>" timestamp: 2011-06-02 11:59:28 +0900 implement feature X. (patch...)   p1: 48334cb9e1...      p2: 0000000000...
nodeid .hg/ bcd055... 8a9310... SHA-1 hash Made from whole commit information 384fca... a87493... 048293... 4fcf85...
parents (p1,p2) .hg/ p2 p1 p1 ,[object Object]
null = 000000...p1 p1 p1
rev .hg/ 4 5 ,[object Object]
no consistency between repos
just for convenience!2 1 3 0
branch .hg/ default featureX ,[object Object]
all commitshave their branch name(c.f. git)featureX featureX default default
Notes for Git users Different concept of branches All commits have their branch name No reachability check hg log  shows all commits Commits cannot be amended or erased (usually)
Commit nodeid: 9e66e5ae2b... rev: 42 branch: default author: "Shuhei Takahashi <nya@example.com>" timestamp: 2011-06-02 11:59:28 +0900 implement feature X. (patch...)   p1: 48334cb9e1...      p2: 0000000000...
Referring commits rev nodeid branch name... commit in the branch with the largest rev "tip" ... commit in any branch with the largest rev "null" ... root commit tag
Referring commits .hg/ 4 5 3 tip default featureX 2 featureX 1 3 default 0
Basic operations
Check out a revision .hg/ 4 5 Working Copy 2 1 3 $ hg update 3 0
Making commit Working Copy .hg/ $ hg add hoge.txt ... edit working copy ...
Making commit Working Copy .hg/ $ hg commit
Making branch Working Copy .hg/ default featureX default $ hg update default featureX featureX default default
Making branch Working Copy .hg/ release featureX default $ hg branch release featureX featureX default default
Making branch Working Copy .hg/ release $ hg commit featureX default featureX featureX default default
Pull hg pull local remote
Push hg push local remote
Pull / Push Just makes union of two history graphs Merge operation is never performed(c.f. Git) Can specify subgraph by a list of heads
Merge - "healthy" branch One head per branches featureX default
Merge - "unhealthy" branch "default" branch has two heads - multiple heads Branch tip varies by rev order! Push that will end up with multiple heads is rejected ? ? default
Merge Checked out rev. 1 Pulled rev. 2, 3, resulting multiple heads (1, 3) 3 1 2 default 0

Más contenido relacionado

La actualidad más candente

Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxyIsmael Celis
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueGleicon Moraes
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
Laravel 5.6 new features and updates
Laravel 5.6  new features and updatesLaravel 5.6  new features and updates
Laravel 5.6 new features and updatesRocketRoute
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaYoungHeon (Roy) Kim
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scriptingTony Fabeen
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev ConfTom Croucher
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queueBrandon Lamb
 
PL/Perl - New Features in PostgreSQL 9.0 201012
PL/Perl - New Features in PostgreSQL 9.0 201012PL/Perl - New Features in PostgreSQL 9.0 201012
PL/Perl - New Features in PostgreSQL 9.0 201012Tim Bunce
 
Sessionization with Spark streaming
Sessionization with Spark streamingSessionization with Spark streaming
Sessionization with Spark streamingRamūnas Urbonas
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyTim Bunce
 
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...Big Data Spain
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0bcoca
 
How to admin
How to adminHow to admin
How to adminyalegko
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupGreg DeKoenigsberg
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo
 

La actualidad más candente (20)

Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxy
 
Puppet
PuppetPuppet
Puppet
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Tuning Solr for Logs
Tuning Solr for LogsTuning Solr for Logs
Tuning Solr for Logs
 
Laravel 5.6 new features and updates
Laravel 5.6  new features and updatesLaravel 5.6  new features and updates
Laravel 5.6 new features and updates
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
 
PL/Perl - New Features in PostgreSQL 9.0 201012
PL/Perl - New Features in PostgreSQL 9.0 201012PL/Perl - New Features in PostgreSQL 9.0 201012
PL/Perl - New Features in PostgreSQL 9.0 201012
 
DevOps with Fabric
DevOps with FabricDevOps with Fabric
DevOps with Fabric
 
Sessionization with Spark streaming
Sessionization with Spark streamingSessionization with Spark streaming
Sessionization with Spark streaming
 
Ubic
UbicUbic
Ubic
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
 
Ansible leveraging 2.0
Ansible leveraging 2.0Ansible leveraging 2.0
Ansible leveraging 2.0
 
How to admin
How to adminHow to admin
How to admin
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
 
Odoo Online platform: architecture and challenges
Odoo Online platform: architecture and challengesOdoo Online platform: architecture and challenges
Odoo Online platform: architecture and challenges
 

Destacado

ICFP Programming Contest 2016 Overview & Random Inside Stories
ICFP Programming Contest 2016 Overview & Random Inside StoriesICFP Programming Contest 2016 Overview & Random Inside Stories
ICFP Programming Contest 2016 Overview & Random Inside Storiesnya3jp
 
ICFPC2010 / PurePureCode++
ICFPC2010 / PurePureCode++ICFPC2010 / PurePureCode++
ICFPC2010 / PurePureCode++nya3jp
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionIn a Rocket
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting PersonalKirsty Hulse
 
10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer ExperienceYuan Wang
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanPost Planner
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
 

Destacado (8)

ICFP Programming Contest 2016 Overview & Random Inside Stories
ICFP Programming Contest 2016 Overview & Random Inside StoriesICFP Programming Contest 2016 Overview & Random Inside Stories
ICFP Programming Contest 2016 Overview & Random Inside Stories
 
ICFPC2010 / PurePureCode++
ICFPC2010 / PurePureCode++ICFPC2010 / PurePureCode++
ICFPC2010 / PurePureCode++
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience10 Insightful Quotes On Designing A Better Customer Experience
10 Insightful Quotes On Designing A Better Customer Experience
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 

Similar a Mercurial for Kittens

Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
HackMTY - GitHub Workshop
HackMTY - GitHub WorkshopHackMTY - GitHub Workshop
HackMTY - GitHub WorkshopLuis Lamadrid
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systemsxSawyer
 
Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductortimyates
 
Subversion: A Getting Started Presentation
Subversion: A Getting Started PresentationSubversion: A Getting Started Presentation
Subversion: A Getting Started PresentationNap Ramirez
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAtlassian
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messesKatie Sylor-Miller
 
Crafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in RubyCrafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in RubyNikhil Mungel
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh thingsMarcus Deglos
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about gitSothearin Ren
 
Gitting It Under (Version) Control
Gitting It Under (Version) ControlGitting It Under (Version) Control
Gitting It Under (Version) Controlmobiledevnj
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment TacticsIan Barber
 
Take the next step with git
Take the next step with gitTake the next step with git
Take the next step with gitKarin Taliga
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Pantheon
 

Similar a Mercurial for Kittens (20)

Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
HackMTY - GitHub Workshop
HackMTY - GitHub WorkshopHackMTY - GitHub Workshop
HackMTY - GitHub Workshop
 
cheat-sheets.pdf
cheat-sheets.pdfcheat-sheets.pdf
cheat-sheets.pdf
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
 
Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductor
 
Subversion: A Getting Started Presentation
Subversion: A Getting Started PresentationSubversion: A Getting Started Presentation
Subversion: A Getting Started Presentation
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Git training
Git trainingGit training
Git training
 
Subversion To Mercurial
Subversion To MercurialSubversion To Mercurial
Subversion To Mercurial
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
 
Intro django
Intro djangoIntro django
Intro django
 
Crafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in RubyCrafting Beautiful CLI Applications in Ruby
Crafting Beautiful CLI Applications in Ruby
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 
New features in Ruby 2.5
New features in Ruby 2.5New features in Ruby 2.5
New features in Ruby 2.5
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
 
Gitting It Under (Version) Control
Gitting It Under (Version) ControlGitting It Under (Version) Control
Gitting It Under (Version) Control
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Take the next step with git
Take the next step with gitTake the next step with git
Take the next step with git
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Mercurial for Kittens

  • 1. Mercurial for Kittens Shuhei Takahashi<takahashi.shuhei@gmail.com>
  • 3. Features Simple design Decentralized system High performance Extensible framework
  • 4. Outline History model Basic operations
  • 6. Checking out Mercurial repo $ hg clone http://example.com/hg example updating to branch default 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ ls -lA example/ drwxr-xr-x 3 nya nya 4096 2011-05-22 20:59 .hg -rw-r--r-- 1 nya nya 14 2011-05-22 20:59 README drwxr-xr-x 2 nya nya 4096 2011-05-22 20:59 src
  • 7. Standard Mercurial repo example/ .hg/ README src/ a.cc a.h Repository Working copy
  • 8. Standard Mercurial repo example/ .hg/ hgrc dirstate store/ ... repo-local config working copy state history
  • 9. History .hg/ Merge X Improve X diff -r 000000... -r 39fca2... README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Sun May 22 20:59:40 2011 +0900 @@ -0,0 +1,1 @@ +Hello, world! Implemented X Implementing X Bugfix First commit
  • 10. Commit nodeid: 9e66e5ae2b... rev: 42 branch: featureX author: "Shuhei Takahashi <nya@example.com>" timestamp: 2011-06-02 11:59:28 +0900 implement feature X. (patch...) p1: 48334cb9e1... p2: 0000000000...
  • 11. nodeid .hg/ bcd055... 8a9310... SHA-1 hash Made from whole commit information 384fca... a87493... 048293... 4fcf85...
  • 12.
  • 14.
  • 17.
  • 18. all commitshave their branch name(c.f. git)featureX featureX default default
  • 19. Notes for Git users Different concept of branches All commits have their branch name No reachability check hg log shows all commits Commits cannot be amended or erased (usually)
  • 20. Commit nodeid: 9e66e5ae2b... rev: 42 branch: default author: "Shuhei Takahashi <nya@example.com>" timestamp: 2011-06-02 11:59:28 +0900 implement feature X. (patch...) p1: 48334cb9e1... p2: 0000000000...
  • 21. Referring commits rev nodeid branch name... commit in the branch with the largest rev "tip" ... commit in any branch with the largest rev "null" ... root commit tag
  • 22. Referring commits .hg/ 4 5 3 tip default featureX 2 featureX 1 3 default 0
  • 24. Check out a revision .hg/ 4 5 Working Copy 2 1 3 $ hg update 3 0
  • 25. Making commit Working Copy .hg/ $ hg add hoge.txt ... edit working copy ...
  • 26. Making commit Working Copy .hg/ $ hg commit
  • 27. Making branch Working Copy .hg/ default featureX default $ hg update default featureX featureX default default
  • 28. Making branch Working Copy .hg/ release featureX default $ hg branch release featureX featureX default default
  • 29. Making branch Working Copy .hg/ release $ hg commit featureX default featureX featureX default default
  • 30. Pull hg pull local remote
  • 31. Push hg push local remote
  • 32. Pull / Push Just makes union of two history graphs Merge operation is never performed(c.f. Git) Can specify subgraph by a list of heads
  • 33. Merge - "healthy" branch One head per branches featureX default
  • 34. Merge - "unhealthy" branch "default" branch has two heads - multiple heads Branch tip varies by rev order! Push that will end up with multiple heads is rejected ? ? default
  • 35. Merge Checked out rev. 1 Pulled rev. 2, 3, resulting multiple heads (1, 3) 3 1 2 default 0
  • 36. Merge hg merge 3 Working copy now has two parents (1, 3) Not yet committed! hg merge is forbidden if WC has pending changes p2 p1 3 1 2 default 0
  • 37. Merge hg commit 4 p2 p1 3 1 2 default 0
  • 38. More fun stuff hgweb.cgi Extensions Mercurial queue (MQ) Rebase ... Hooks Mercurial as a Python module
  • 39. References Mercurial: The Definitive Guide Chapter 4. Behind the scenes google:///hgbook or available from O'reilly