Developer(s) Matt Mackall | ||
Initial release 19 April 2005; 11 years ago (2005-04-19) Stable release 4.1.1 / 2 March 2017; 15 days ago (2017-03-02) Repository www.mercurial-scm.org/repo/hg-stable/ Operating system |
Mercurial, a cross-platform, distributed revision-control tool for software developers, is mainly implemented using the Python programming language, but includes a binary diff implementation written in C. It is supported on MS Windows and Unix-like systems, such as FreeBSD, Mac OS X and Linux. Mercurial is primarily a command-line driven program, but graphical user interface extensions are available. 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).
Contents
- History
- Design
- Usage
- Adoption
- Mercurial Servers and Repository Management
- Source code hosting
- Open source projects using Mercurial
- References
Mercurial's major design goals include high performance and scalability, decentralized, fully distributed collaborative development, robust handling of both plain text and binary files, and advanced branching and merging capabilities, while remaining conceptually simple. It includes an integrated web-interface. Mercurial has also taken steps to ease the transition for users of other version control systems, particularly Subversion.
Matt Mackall originated Mercurial and serves as its lead developer. Mercurial is released as free software under the terms of the GNU GPL v2 (or any later version).
History
Mackall first announced Mercurial on 19 April 2005. The impetus for this was the announcement earlier that month by Bitmover that they were withdrawing the free version of BitKeeper.
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 another project called Git, initiated by Linus Torvalds with similar aims.
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.
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.
In 2013, Facebook adopted Mercurial and began work on scaling it to handle their large, unified code repository.
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, the W3C, and Mozilla. Facebook is writing a Mercurial server in Rust
Mercurial Servers and Repository Management
Source code hosting
The following websites provide free source code hosting for Mercurial repositories:
Open source projects using Mercurial
Some projects using the Mercurial distributed RCS: