Mercurial
Developer(s) | Olivia Mackall[a] (retired),[1] Pierre-Yves David |
---|---|
Initial release | 19 April 2005[2] |
Stable release | 6.4rc0[3]
/ 2 March 2023; 8 July 2024; 1 August 2024 |
Repository | |
Written in | Python, C, and Rust[4] |
Operating system | Unix-like, Windows, macOS |
Type | Version control |
License | GPL-2.0-or-later |
Website | www |
Mercurial is a distributed revision control tool for software developers. It is supported on Microsoft Windows, Linux, and other Unix-like systems, such as FreeBSD and macOS.
Mercurial's major design goals include high performance and scalability, decentralization, fully distributed collaborative development, robust handling of both plain text and binary files, and advanced branching and merging capabilities, while remaining conceptually simple.[5] It includes an integrated web-interface. Mercurial has also taken steps to ease the transition for users of other version control systems, particularly Subversion. Mercurial is primarily a command-line driven program, but graphical user interface extensions are available, e.g. TortoiseHg, and several IDEs offer support for version control with Mercurial. All of Mercurial's operations are invoked as arguments to its driver program hg
(a reference to Hg – the chemical symbol of the element mercury).
Olivia Mackall[a] originated Mercurial and served as its lead developer until late 2016. Mercurial is released as free software under the GPL-2.0-or-later license.[7] It is mainly implemented using the Python programming language, but includes a binary diff implementation written in C.
History
[edit]Mackall first announced Mercurial on 19 April 2005.[2] The impetus for this was the announcement earlier that month by Bitmover that they were withdrawing the free version of BitKeeper because of the development of SourcePuller.
BitKeeper had been used for the version control requirements of the Linux kernel project. Mackall decided to write a distributed version control system as a replacement for use with the Linux kernel. This project started a few days after the now well-known Git project was initiated by Linus Torvalds with similar aims.[8]
The Linux kernel project decided to use Git rather than Mercurial, but Mercurial is now used by many other projects (see below).
In an answer on the Mercurial mailing list, Olivia Mackall explained how the name "Mercurial" was chosen:
Shortly before the first release, I read an article about the ongoing Bitkeeper debacle that described Larry McVoy as mercurial (in the sense of 'fickle'). Given the multiple meanings, the convenient abbreviation, and the good fit with my pre-existing naming scheme (see my email address), it clicked instantly. Mercurial is thus named in Larry's honor. I do not know if the same is true of Git.[9][10]
High-profile projects such as the OpenJDK have used Mercurial in the past,[11] though the OpenJDK no longer does as of Java 16.
Design
[edit]Mercurial uses SHA-1 hashes to identify revisions. For repository access via a network, Mercurial uses an HTTP-based protocol that seeks to reduce round-trip requests, new connections, and data transferred. Mercurial can also work over SSH where the protocol is very similar to the HTTP-based protocol. By default it uses a 3-way merge before calling external merge tools.
Usage
[edit]Figure 1 shows some of the most important operations in Mercurial and their relations to Mercurial's concepts.
Adoption
[edit]Although Mercurial was not selected to manage the Linux kernel sources, it has been adopted by several organizations, including Facebook,[12] the W3C, and Mozilla. Facebook is using the Rust programming language to write Mononoke,[13][14] a Mercurial server specifically designed to support large multi-project repositories.
In 2013, Facebook adopted Mercurial and began work on scaling it to handle their large, unified code repository.[15]
Google also uses Mercurial client as a front-end on their cloud-based 'Piper' monorepo back-end.[16]
Bitbucket announced that its web-based version control services would end support for Mercurial in June 2020 (then extended to July 2020),[17] explaining that "less than 1% of new projects use it, and developer surveys indicated that 90% of developers use Git".[18]
Mercurial servers and repository management
[edit]- Heptapod, a GitLab fork for Mercurial by Octobus
- Kallithea, a GPLv3 fork of RhodeCode
- Kiln by Glitch, Inc.
- Phabricator by Phacility
- RhodeCode by RhodeCode Inc.
Source code hosting
[edit]The following websites provide free source code hosting for Mercurial repositories:
- Bitbucket by Atlassian (deprecated from February 2020; read-only since July 2020)[18]
- Codebase[19]
- FusionForge
- GNU Savannah by FSF
- Heptapod
- Mozdev
- OSDN[20]
- Others[21]
- Perforce[22]
- Puszcza[23] (a sister site to GNU Savannah, hosted in Ukraine)
- SourceForge
- SourceHut
- TuxFamily[24]
Open source projects using Mercurial
[edit]Some projects using the Mercurial distributed RCS:[25]
See also
[edit]Notes
[edit]References
[edit]- ^ "mpm - Mercurial". Mercurial. Retrieved 24 February 2023.
- ^ a b Mackall, Matt (20 April 2005). "Mercurial v0.1 – a minimal scalable distributed SCM". Linux kernel (Mailing list).
- ^ "changeset 50269:05de4896508e stable 6.4rc0".
- ^ "README file in rust subdirectory, master branch". 24 January 2020. Retrieved 30 January 2020.
- ^ Mackall, Matt. "Towards a Better SCM: Revlog and Mercurial" (PDF). Mercurial. Archived (PDF) from the original on 26 May 2019. Retrieved 26 May 2019.
- ^ "Matt Mackall is now Olivia Mackall". Mercurial. Retrieved 28 May 2021.
- ^ "Relicensing", Mercurial (wiki), Mercurial-scm.org.
- ^ Mackall, Matt (29 April 2005). "Re: Mercurial 0.4b vs git patchbomb benchmark". Linux kernel (Mailing list). Archived from the original on 9 July 2012.
- ^ Mackall, Matt (15 February 2012). "Why did Matt choose the name Mercurial?". Mercurial (Mailing list). Retrieved 7 June 2016.
- ^ Torvalds has said: "I'm an egotistical bastard, so I name all my projects after myself. First Linux, now git."
- ^ James Gosling (October 2006). "Open Sourcing Sun's Java Platform Implementations, Part 1" (Interview). Interviewed by Robert Eckstein. Sun. Archived from the original on 1 March 2009.
{{cite interview}}
: CS1 maint: unfit URL (link) - ^ "Scaling Mercurial at Facebook". 7 January 2014.
- ^ "A Mercurial source control server, specifically designed to support large monorepos.: facebookexperimental/mononoke". 31 January 2019 – via GitHub.
- ^ Szorc, Gregory (17 October 2016). "Mercurial 4.0 Sprint Notes". mozilla.dev.version-control. Google Groups. Retrieved 2021-11-22.
- ^ Goode, Durham; Agarwal, Siddharth (7 January 2014). "Scaling Mercurial at Facebook". Facebook Code. Retrieved 13 October 2015 – via Facebook.
- ^ "Why Google Stores Billions of Lines of Code in a Single Repository".
- ^ "Sunsetting Mercurial support in Bitbucket". 21 April 2020. Archived from the original on 1 July 2020.
- ^ a b Chan, Denise (20 August 2019). "Sunsetting Mercurial support in Bitbucket". Bitbucket. Retrieved 29 August 2019.
- ^ "Git, Mercurial & Subversion hosting". Features. Codebase HQ. 4 March 2013. Archived from the original on 30 March 2014. Retrieved 4 March 2013.
- ^ "Let's start OSS development with Mercurial (Hg) – OSDN". osdn.net.
- ^ "Hosting", Mercurial (wiki), Mercurial-scm.org.
- ^ "Try Helix TeamHub Free | Perforce". info.perforce.com.
- ^ "Welcome [Puszcza]". ps.gnu.org.ua.
- ^ "TuxFamily: Free hosting for free people". tuxfamily.org.
- ^ "Some projects that use Mercurial", Mercurial (wiki), Mercurial-scm.org.
- ^ Reed, J Paul (12 April 2007). "Version Control System Shootout Redux Redux".
- ^ mozilla-mobile/fenix, Mozilla Mobile, 19 March 2021, retrieved 19 March 2021
External links
[edit]- Official website
- Mackall, Matt, "FLOSS Podcast", This week in Tech
- O'Sullivan, Bryan (2009), Mercurial: The Definitive Guide (book), O'Reilly, freely available online
- Spolsky, Joel, Mercurial tutorial, archived from the original on 13 June 2016, retrieved 6 April 2010
- An example-based Mercurial tutorial (PDF), SE: Jemander covering both basic and advanced use
- "Mercurial: an alternative to git", LWN
- "Subversion or CVS, Bazaar or Mercurial? Four open source version control systems compared", JavaWorld, September 2007
- "Mercurial", TechTalk (video), archived from the original on 21 December 2021
- List of projects using Mercurial from the Mercurial wiki