SlideShare una empresa de Scribd logo
1 de 25
Mercurial A Distributed Version Control System DmitriyIassenev GSC Game World 2011
Why Mercurial? Pros It has rich functionality It is easy to customize If you like Python It scales good Big files need to be handled carefully It has good GUI client – TortoiseHG It is easy to learn Non-progammers could have problems with it
Why Mercurial? Cons Every user has the whole repository User access rights problems – use subrepositories? Every user should have enough HDD space
Mercurialvs Subversion Pros Simpler for non-programmers Even better GUI client – TortoiseSVN (at the time we choose) Handle big files well without any additional effort Need less space on HDD Mixed revisions working copy Exclusive file lock
Mercurial vs Subversion Cons Centralized VCS No local commits No inter-repository commands Slower on most operations Complicated and restrictive merge and branch functionality In some use cases need even more space on HDD .svn folders Impossible to setup ignore filter for future folders Easier to loose your changes
Mercurial vsGit Pros Even more rich functionality Faster on Linux
Mercurial vsGit Cons Worse performance on Windows (2009 year measurements) You should “repack” your local repository to prevent performance degradation No good free GUI client for Windows at the time we choose – TortoiseGit? It is known to be more complicated for both programmers and non-programmers
How does Mercurial work? Local Repository and Working Copy commit update merge rebase
Local repository and Working Copy Merge 1 2				          3
Local repository and Working Copy Rebase 1 2
Inter-repository communication clone pull After pull commands Update Fetch = update + merge + commit Rebase push push after commit option serve
Tags and Branches Tags Merge tags - .hgtags Branches Repository clones Markers Named branches Anonymous branches (several heads in a branch) Branch hierarchy doesn’t depend on folders structure (unlike Subversion)
Under the hood Deltas even for binaries Atomic transactions – only append to revlog Fast retrieval – snapshots File and folder renames Avoid case sensitive renames on case insensitive FSs Compression: deflate and bzip2 Concurrent access – lockless reading Minimizing disk seeks Hard links for cloning repositories locally
Recovering from errors Revert Rollback Undo the last commit Undo erroneous pull Backout Recovering from erroneous merge
Recovering from errors Rollback 1 2
Recovering from errors Backout 1 2
Recovering from erroneous merge 1				       2 3				       4
Hooks changegroup – we use it to detect when someone pushed to repository precommit – we use it to prevent case folding collisions
Extensions Modified Bigfiles Fetch Rebase Transplant Mercurial Queues (for Strip)
How we use Mercurial Multiplatform engine for video game and game itself (Win32, Win64, Xbox360, PS3) C++ for engine and game, C# for tools (.NET + WPF) Team: 11 programmers + 13 designers (up to 40 designers in a production stage) ~467k lines of code ~= 15Mb ~3.5M lines of code from various SDK and third party libraries which we build ~= 132Mb Working Copy: ~33.6k files and folders ~= 16.8Gb Local Repository (~0.4Gb) => 17.2Gb per user Full repository ~= 135Gb
Continuous Integration Workflow 2 Central repositories + Build station Programmers repository Build station repository Designers repository We plan to use Central repository for Testers
Continuous Integration Workflow on push to Programmers pull Build station from Programmers build binaries for all 16 projects configurations run tests commit to Build station repository on success or report failure otherwise pull from Designers push to Designers on push to Designers pull Programmers from Designers
Merge tool we use - Perforce p4merge
Questions? Feel free to email me at iassenev@gsc-game.com Online resources: “Mercurial: The Definitive Guide” by Bryan O'Sullivan - http://hgbook.red-bean.com/ Joel Spolsky Tutorial on Mercurial - http://hginit.com/

Más contenido relacionado

La actualidad más candente

Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel Developers
Kernel TLV
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
ScyllaDB
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
MongoDB
 

La actualidad más candente (20)

LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
Life Preserver - AsiaBSDCon2014
Life Preserver - AsiaBSDCon2014Life Preserver - AsiaBSDCon2014
Life Preserver - AsiaBSDCon2014
 
LSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVMLSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVM
 
Chap 17 advfs
Chap 17 advfsChap 17 advfs
Chap 17 advfs
 
vbsd2013
vbsd2013vbsd2013
vbsd2013
 
Ilf2013
Ilf2013Ilf2013
Ilf2013
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel Developers
 
A brief history of system calls
A brief history of system callsA brief history of system calls
A brief history of system calls
 
Texas 2013
Texas 2013Texas 2013
Texas 2013
 
Docker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme PetazzoniDocker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme Petazzoni
 
eurobsd2013
eurobsd2013eurobsd2013
eurobsd2013
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
 
Lpreservereurobsd2014
Lpreservereurobsd2014Lpreservereurobsd2014
Lpreservereurobsd2014
 
Bsd ss
Bsd ssBsd ss
Bsd ss
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containers
 
BSDCan2013
BSDCan2013BSDCan2013
BSDCan2013
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
Introduction to systemd
Introduction to systemdIntroduction to systemd
Introduction to systemd
 

Destacado

Svn vs mercurial vs github
Svn  vs  mercurial vs  githubSvn  vs  mercurial vs  github
Svn vs mercurial vs github
Vinoth Kannan
 

Destacado (13)

Mercurial training
 Mercurial training Mercurial training
Mercurial training
 
Mercurial DVCS presentation to DevJam 11/4/2009
Mercurial DVCS presentation to DevJam 11/4/2009Mercurial DVCS presentation to DevJam 11/4/2009
Mercurial DVCS presentation to DevJam 11/4/2009
 
Virt monitoring
Virt monitoringVirt monitoring
Virt monitoring
 
Mercurial 簡介
Mercurial 簡介Mercurial 簡介
Mercurial 簡介
 
Puppet_training
Puppet_trainingPuppet_training
Puppet_training
 
Svn vs mercurial vs github
Svn  vs  mercurial vs  githubSvn  vs  mercurial vs  github
Svn vs mercurial vs github
 
Sql joins
Sql joinsSql joins
Sql joins
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql ServerTypes Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
 
SQL Joins
SQL JoinsSQL Joins
SQL Joins
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
Sql joins
Sql joinsSql joins
Sql joins
 
SQL JOIN
SQL JOINSQL JOIN
SQL JOIN
 
Vandyke SecureCRT tips and tricks
Vandyke SecureCRT tips and tricksVandyke SecureCRT tips and tricks
Vandyke SecureCRT tips and tricks
 

Similar a Mercurial

Distributed file systems (from Google)
Distributed file systems (from Google)Distributed file systems (from Google)
Distributed file systems (from Google)
Sri Prasanna
 
Distributed computing seminar lecture 3 - distributed file systems
Distributed computing seminar   lecture 3 - distributed file systemsDistributed computing seminar   lecture 3 - distributed file systems
Distributed computing seminar lecture 3 - distributed file systems
tugrulh
 

Similar a Mercurial (20)

.ppt
.ppt.ppt
.ppt
 
A Front-Row Seat to Ticketmaster’s Use of MongoDB
A Front-Row Seat to Ticketmaster’s Use of MongoDBA Front-Row Seat to Ticketmaster’s Use of MongoDB
A Front-Row Seat to Ticketmaster’s Use of MongoDB
 
System Storage Manager
System Storage ManagerSystem Storage Manager
System Storage Manager
 
tittle
tittletittle
tittle
 
Experience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's ViewExperience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's View
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
 
Google
GoogleGoogle
Google
 
Технологии работы с дисковыми хранилищами и файловыми системами Windows Serve...
Технологии работы с дисковыми хранилищами и файловыми системами Windows Serve...Технологии работы с дисковыми хранилищами и файловыми системами Windows Serve...
Технологии работы с дисковыми хранилищами и файловыми системами Windows Serve...
 
Distributed file systems (from Google)
Distributed file systems (from Google)Distributed file systems (from Google)
Distributed file systems (from Google)
 
GlusterFs: a scalable file system for today's and tomorrow's big data
GlusterFs: a scalable file system for today's and tomorrow's big dataGlusterFs: a scalable file system for today's and tomorrow's big data
GlusterFs: a scalable file system for today's and tomorrow's big data
 
GlusterFS : un file system open source per i big data di oggi e domani - Robe...
GlusterFS : un file system open source per i big data di oggi e domani - Robe...GlusterFS : un file system open source per i big data di oggi e domani - Robe...
GlusterFS : un file system open source per i big data di oggi e domani - Robe...
 
2337610
23376102337610
2337610
 
Interview questions
Interview questionsInterview questions
Interview questions
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
 
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!
 
Hyper v r2 deep dive
Hyper v r2 deep diveHyper v r2 deep dive
Hyper v r2 deep dive
 
Low level java programming
Low level java programmingLow level java programming
Low level java programming
 
Lec3 Dfs
Lec3 DfsLec3 Dfs
Lec3 Dfs
 
Distributed computing seminar lecture 3 - distributed file systems
Distributed computing seminar   lecture 3 - distributed file systemsDistributed computing seminar   lecture 3 - distributed file systems
Distributed computing seminar lecture 3 - distributed file systems
 

Más de Kiev ALT.NET

Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
Kiev ALT.NET
 
Reactive Extensions
Reactive ExtensionsReactive Extensions
Reactive Extensions
Kiev ALT.NET
 
Continuous Integration (CI)
Continuous Integration (CI)Continuous Integration (CI)
Continuous Integration (CI)
Kiev ALT.NET
 
Command-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практикаCommand-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практика
Kiev ALT.NET
 

Más de Kiev ALT.NET (16)

CQRS EventStore
CQRS EventStoreCQRS EventStore
CQRS EventStore
 
Design by Contract
Design by ContractDesign by Contract
Design by Contract
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
Async
AsyncAsync
Async
 
Linq providers
Linq providersLinq providers
Linq providers
 
Reactive Extensions
Reactive ExtensionsReactive Extensions
Reactive Extensions
 
NoSql, MongoDb
NoSql, MongoDbNoSql, MongoDb
NoSql, MongoDb
 
CouchDb
CouchDbCouchDb
CouchDb
 
Orchard
OrchardOrchard
Orchard
 
CI via TFS
CI via TFSCI via TFS
CI via TFS
 
Continuous Integration (CI)
Continuous Integration (CI)Continuous Integration (CI)
Continuous Integration (CI)
 
WebSharper - веб-программирование без слёз
WebSharper - веб-программирование без слёзWebSharper - веб-программирование без слёз
WebSharper - веб-программирование без слёз
 
F# - функциональный язык «новой» волны
F# - функциональный  язык «новой» волныF# - функциональный  язык «новой» волны
F# - функциональный язык «новой» волны
 
Caliburn Micro Overview
Caliburn Micro OverviewCaliburn Micro Overview
Caliburn Micro Overview
 
Введение в MVVM
Введение в MVVMВведение в MVVM
Введение в MVVM
 
Command-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практикаCommand-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практика
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Mercurial

  • 1. Mercurial A Distributed Version Control System DmitriyIassenev GSC Game World 2011
  • 2. Why Mercurial? Pros It has rich functionality It is easy to customize If you like Python It scales good Big files need to be handled carefully It has good GUI client – TortoiseHG It is easy to learn Non-progammers could have problems with it
  • 3. Why Mercurial? Cons Every user has the whole repository User access rights problems – use subrepositories? Every user should have enough HDD space
  • 4. Mercurialvs Subversion Pros Simpler for non-programmers Even better GUI client – TortoiseSVN (at the time we choose) Handle big files well without any additional effort Need less space on HDD Mixed revisions working copy Exclusive file lock
  • 5. Mercurial vs Subversion Cons Centralized VCS No local commits No inter-repository commands Slower on most operations Complicated and restrictive merge and branch functionality In some use cases need even more space on HDD .svn folders Impossible to setup ignore filter for future folders Easier to loose your changes
  • 6. Mercurial vsGit Pros Even more rich functionality Faster on Linux
  • 7. Mercurial vsGit Cons Worse performance on Windows (2009 year measurements) You should “repack” your local repository to prevent performance degradation No good free GUI client for Windows at the time we choose – TortoiseGit? It is known to be more complicated for both programmers and non-programmers
  • 8. How does Mercurial work? Local Repository and Working Copy commit update merge rebase
  • 9. Local repository and Working Copy Merge 1 2 3
  • 10. Local repository and Working Copy Rebase 1 2
  • 11. Inter-repository communication clone pull After pull commands Update Fetch = update + merge + commit Rebase push push after commit option serve
  • 12. Tags and Branches Tags Merge tags - .hgtags Branches Repository clones Markers Named branches Anonymous branches (several heads in a branch) Branch hierarchy doesn’t depend on folders structure (unlike Subversion)
  • 13. Under the hood Deltas even for binaries Atomic transactions – only append to revlog Fast retrieval – snapshots File and folder renames Avoid case sensitive renames on case insensitive FSs Compression: deflate and bzip2 Concurrent access – lockless reading Minimizing disk seeks Hard links for cloning repositories locally
  • 14. Recovering from errors Revert Rollback Undo the last commit Undo erroneous pull Backout Recovering from erroneous merge
  • 15. Recovering from errors Rollback 1 2
  • 16. Recovering from errors Backout 1 2
  • 17. Recovering from erroneous merge 1 2 3 4
  • 18. Hooks changegroup – we use it to detect when someone pushed to repository precommit – we use it to prevent case folding collisions
  • 19. Extensions Modified Bigfiles Fetch Rebase Transplant Mercurial Queues (for Strip)
  • 20. How we use Mercurial Multiplatform engine for video game and game itself (Win32, Win64, Xbox360, PS3) C++ for engine and game, C# for tools (.NET + WPF) Team: 11 programmers + 13 designers (up to 40 designers in a production stage) ~467k lines of code ~= 15Mb ~3.5M lines of code from various SDK and third party libraries which we build ~= 132Mb Working Copy: ~33.6k files and folders ~= 16.8Gb Local Repository (~0.4Gb) => 17.2Gb per user Full repository ~= 135Gb
  • 21. Continuous Integration Workflow 2 Central repositories + Build station Programmers repository Build station repository Designers repository We plan to use Central repository for Testers
  • 22. Continuous Integration Workflow on push to Programmers pull Build station from Programmers build binaries for all 16 projects configurations run tests commit to Build station repository on success or report failure otherwise pull from Designers push to Designers on push to Designers pull Programmers from Designers
  • 23. Merge tool we use - Perforce p4merge
  • 24.
  • 25. Questions? Feel free to email me at iassenev@gsc-game.com Online resources: “Mercurial: The Definitive Guide” by Bryan O'Sullivan - http://hgbook.red-bean.com/ Joel Spolsky Tutorial on Mercurial - http://hginit.com/