Mercurial
Mercurial is a distributed revision-control tool for software developers. It is supported on Microsoft Windows and Unix-like systems, such as FreeBSD, macOS and Linux.
Developer(s) | Matt Mackall |
---|---|
Initial release | 19 April 2005[1] |
Stable release | 5.5
/ 3 August 2020[2] |
Repository | |
Written in | Python, C, and Rust[3] |
Operating system | Unix-like, Windows, macOS |
Type | Version control |
License | GNU GPL v2+ |
Website | www |
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.[4] 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).
Matt Mackall originated Mercurial and served as its lead developer until late 2016. Mercurial is released as free software under the terms of the GNU GPL v2 (or any later version[5]). It is mainly implemented using the Python programming language, but includes a binary diff implementation written in C.
History
Mackall first announced Mercurial on 19 April 2005.[1] 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.[6]
The Linux kernel project decided to use Git rather than Mercurial, but Mercurial is now used by many other projects (see below). "Git vs. Mercurial" has become one of the holy wars of hacker culture.[7]
In an answer on the Mercurial mailing list, Matt 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.[8][9]
Design
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
Figure 1 shows some of the most important operations in Mercurial and their relations to Mercurial's concepts.
Adoption
Although Mercurial was not selected to manage the Linux kernel sources, it has been adopted by several organizations, including Facebook,[10] the W3C, and Mozilla. Facebook is using the Rust programming language to write Mononoke,[11][12] 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.[13]
Bitbucket announced that its web-based version control services would end support for Mercurial in June 2020 (then changed to July 2020, and then extended to 2020-07-08[14]), explaining that "less than 1% of new projects use it, and developer surveys indicated that 90% of developers use Git."[15], while hundreds of users openly questioned the reasoning for massively deleting historical data, asked why there was not significant warning nor a formal migration plan, and paniced about the rushed timing in their official company support thread.[16]
Mercurial servers and repository management
- RhodeCode by RhodeCode Inc.
- Kallithea, a GPLv3 fork of RhodeCode
- Kiln by Fog Creek Software
- Phabricator by Phacility
Source code hosting
The following websites provide free source code hosting for Mercurial repositories:
- Bitbucket by Atlassian (Deprecated from February 2020; support for Mercurial repositories scheduled to be discontinued from 1 June 2020). As of 8 July 2020, Mercurial repositories are read-only.[15]
- Codebase[17]
- SourceForge
- GNU Savannah by FSF
- Puszcza[18] (a sister site to GNU Savannah, hosted in Ukraine)
- OSDN[19]
- Perforce[20]
- Mozdev
- TuxFamily[21]
- FusionForge
- Sourcehut[22][23]
- Others[24]
Open source projects using Mercurial
Some projects using the Mercurial distributed RCS:[25]
- Adium
- GNU Health
- GNU Multi-Precision Library
- GNU Octave
- IcedTea
- LEMON
- LiquidFeedback
- Mozilla[26]
- Nginx
- OpenJDK[27]
- Orthanc
- Pidgin
- RhodeCode
- Roundup
- SDL
- Tryton
- WinDirStat
- wmii
- XEmacs
- Xine
See also
- Distributed version control
- List of version control software
- Comparison of version control software
References
- Mackall, Matt (20 April 2005). "Mercurial v0.1 – a minimal scalable distributed SCM". Linux kernel (Mailing list).
- Goyal, Pulkit (3 August 2020). "Mercurial 5.5 tagged". mercurial-packaging (Mailing list). Retrieved 3 August 2020.
- "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.
- "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.
- "Managing source code with Mercurial".
Mercurial and Git fans are also happy to discuss the learning curve, merits, and usability of each VCS system's command set. Space prevents that discussion here, but a web search on that topic will provide lots of interesting reading material.
- 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."
- "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.
- "Google Groups". groups.google.com.
- Goode, Durham; Agarwal, Siddharth. "Scaling Mercurial at Facebook". Facebook Code. Facebook. Retrieved 13 October 2015.
- . 1 July 2020 https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket. Archived from the original on 1 July 2020. Missing or empty
|title=
(help) - Chan, Denise (20 August 2019). "Sunsetting Mercurial support in Bitbucket". Bitbucket. Retrieved 29 August 2019.
- "What to do with your Mercurial repos when Bitbucket sunsets support".
|archive-url=
is malformed: timestamp (help) Alt URL - "Git, Mercurial & Subversion hosting". Features. Codebase HQ. 4 March 2013. Archived from the original on 30 March 2014. Retrieved 4 March 2013.
- "Welcome [Puszcza]". ps.gnu.org.ua.
- "Let's start OSS development with Mercurial (Hg) - OSDN". osdn.net.
- "Try Helix TeamHub Free | Perforce". info.perforce.com.
- "TuxFamily: Free hosting for free people". www.tuxfamily.org.
- "GitHub - ianchanning/awesome-github-alternatives: Love 'em or leave 'em". github.com.
- "hg.sr.ht". hg.sr.ht.
- "Hosting", Mercurial (wiki), Mercurial-scm.org.
- "Some projects that use Mercurial", Mercurial (wiki), Mercurial-scm.org.
- Reed, J Paul (12 April 2007). "Version Control System Shootout Redux Redux".
- 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.CS1 maint: unfit url (link)
External links
Look up mercurial in Wiktionary, the free dictionary. |
Wikimedia Commons has media related to Mercurial. |
- Official website
- O'Sullivan, Bryan (2009), Mercurial: The Definitive Guide (book), O'Reilly, freely available online
- "Mercurial: an alternative to git", LWN
- An example-based Mercurial tutorial (PDF), SE: Jemander covering both basic and advanced use
- "Mercurial", TechTalk (video), Google
- "Subversion or CVS, Bazaar or Mercurial? Four open source version control systems compared", JavaWorld, September 2007
- Spolsky, Joel, Mercurial tutorial, archived from the original on 13 June 2016, retrieved 6 April 2010
- Mackall, Matt, "FLOSS Podcast", This week in Tech
- List of projects using Mercurial from the Mercurial wiki