Mercurial Communications
   HOME

TheInfoList



OR:

Mercurial is a
distributed revision control In software development, distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centr ...
tool for software developers. It is supported on Microsoft Windows and
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
systems, such as FreeBSD,
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, and
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
. Mercurial's major design goals include high performance and scalability, decentralization, fully distributed collaborative development, robust handling of both
plain text In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects (floating-point numbers, images, etc.). It may also include a limit ...
and
binary file A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document fil ...
s, 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. Mercurial is primarily a
command-line A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
driven program, but
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...
extensions are available, e.g. TortoiseHg, and several
IDEs Ides or IDES may refer to: Calendar dates * Ides (calendar), a day in the Roman calendar that fell roughly in the middle of the month. In March, May, July, and October it was the 15th day of the month; in other months it was the 13th. **Ides of Mar ...
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 Chemical symbols are the abbreviations used in chemistry for chemical elements, functional groups and chemical compounds. Element symbols for chemical elements normally consist of one or two letters from the Latin alphabet and are written with ...
of the element mercury). Olivia Mackall originated Mercurial and served as its lead developer until late 2016. Mercurial is released as
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
under the GPL-2.0-or-later license. It is mainly implemented using the
Python programming language Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically-typed and garbage-collected. It supports multiple programming p ...
, but includes a binary
diff In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but ...
implementation written in C.


History

Mackall first announced Mercurial on 19 April 2005. The impetus for this was the announcement earlier that month by
Bitmover BitKeeper is a software tool for distributed revision control of computer source code. Originally developed as proprietary software by BitMover Inc., a privately held company based in Los Gatos, California, it was released as open-source software ...
that they were withdrawing the free version of
BitKeeper BitKeeper is a software tool for distributed revision control of computer source code. Originally developed as proprietary software by BitMover Inc., a privately held company based in Los Gatos, California, it was released as open-source softwar ...
because of the development of
SourcePuller SourcePuller is an open-source client for accessing the BitKeeper version control system. It was originally developed by Andrew Tridgell, who reverse engineered the BitKeeper protocol. While not widely used itself, it is best known for triggering ...
. BitKeeper had been used for the
version control In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
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 Git () is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data in ...
project was initiated by
Linus Torvalds Linus Benedict Torvalds ( , ; born 28 December 1969) is a Finnish software engineer who is the creator and, historically, the lead developer of the Linux kernel, used by Linux distributions and other operating systems such as Android. He also ...
with similar aims. The Linux kernel project decided to use
Git Git () is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data in ...
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: High-profile projects such as the
OpenJDK OpenJDK (Open Java Development Kit) is a free and open-source implementation of the Java Platform, Standard Edition (Java SE). It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GPL-2.0-only w ...
have used Mercurial in the past, though the OpenJDK no longer does as of Java 16.


Design

Mercurial uses
SHA-1 In cryptography, SHA-1 (Secure Hash Algorithm 1) is a cryptographically broken but still widely used hash function which takes an input and produces a 160-bit (20- byte) hash value known as a message digest – typically rendered as 40 hexadec ...
hashes to identify revisions. For repository access via a network, Mercurial uses an
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
-based protocol that seeks to reduce round-trip requests, new connections, and data transferred. Mercurial can also work over
SSH The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution. SSH applications are based on ...
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 Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Mosk ...
, the
W3C The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
, and
Mozilla Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, w ...
. Facebook is using the
Rust programming language Rust is a multi-paradigm, general-purpose programming language. Rust emphasizes performance, type safety, and concurrency. Rust enforces memory safety—that is, that all references point to valid memory—without requiring the use of a garb ...
to write Mononoke, 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. Google also uses Mercurial client as a front-end on their cloud-based 'Piper' monorepo back-end.
Bitbucket Bitbucket is a Git-based source code repository hosting service owned by Atlassian. Bitbucket offers both commercial plans and free accounts with an unlimited number of private repositories. Services Bitbucket Cloud Bitbucket Cloud (previ ...
announced that its web-based version control services would end support for Mercurial in June 2020 (then extended to July 2020), explaining that "less than 1% of new projects use it, and developer surveys indicated that 90% of developers use Git".


Mercurial servers and repository management


Heptapod
a
GitLab GitLab Inc. is an open-core company that operates GitLab, a DevOps software package which can develop, secure, and operate software. The open source software project was created by Ukrainian developer Dmitriy Zaporozhets and Dutch developer ...
fork for Mercurial b
Octobus
*
GNU Octave GNU Octave is a high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a langu ...
br>
for Octave and related software * Kallithea (software), Kallithea, a
GPLv3 The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
fork of RhodeCode * Kiln by
Fog Creek Software Glitch (previously known as Fog Creek Software) is a software company specializing in project management tools. Its products include project management and content management, and code review tools. History Based in New York City, Fog Creek wa ...
*
Phabricator Phabricator is a suite of web-based development collaboration tools, which includes ''Differential'' code review tool, ''Diffusion'' repository browser, ''Herald'' change monitoring tool, ''Maniphest'' bug tracker, ''Phriction'' wiki. Phab ...
by Phacility * RhodeCode by RhodeCode Inc.


Source code hosting

The following websites provide free source code hosting for Mercurial repositories: *
Bitbucket Bitbucket is a Git-based source code repository hosting service owned by Atlassian. Bitbucket offers both commercial plans and free accounts with an unlimited number of private repositories. Services Bitbucket Cloud Bitbucket Cloud (previ ...
by
Atlassian Atlassian Corporation () is an Australian software company that develops products for software developers, project managers and other software development teams. The company is domiciled in Delaware, with global headquarters in Sydney, Austra ...
(deprecated from February 2020; read-only since July 2020) * Codebase *
FusionForge GForge is a commercial service originally based on the Alexandria software behind SourceForge, a web-based project management and collaboration system which was licensed under the GPL. Open source versions of the GForge code were released from 20 ...
*
GNU Octave GNU Octave is a high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a langu ...
for Octave-related software and package

*
GNU Savannah GNU Savannah is a project of the Free Software Foundation initiated by Loïc Dachary, which serves as a collaborative software development management system for free Software projects. Savannah currently offers CVS, GNU arch, Subversion, Git, ...
by FSF
Heptapod
*
Mozdev mozdev.org was a website that offered free project hosting, and software development tools to the Mozilla community. Site hosted extensions for Firefox, Thunderbird and SeaMonkey and stand-alone Mozilla-based applications. It was free to set up a ...
*
OSDN OSDN (formerly SourceForge.JP) is a web-based collaborative development environment for open-source software projects. It provides source code repositories and web hosting services. With features similar to SourceForge, it acts as a centralized ...
* Others *
Perforce Perforce, legally Perforce Software, Inc., is an American developer of software used for developing and running applications, including version control software, web-based repository management, developer collaboration, application lifecycle man ...
* Puszcza (a sister site to GNU Savannah, hosted in Ukraine) *
SourceForge SourceForge is a web service that offers software consumers a centralized online location to control and manage open-source software projects and research business software. It provides source code repository hosting, bug tracking, mirroring ...
* SourceHut * TuxFamily


Open source projects using Mercurial

Some projects using the Mercurial distributed RCS: *
GNU Health GNU Health is a free/libre health and hospital information system with strong focus on public health and social medicine. Its functionality includes management of electronic health records and laboratory information management system. It is de ...
*
GNU Multi-Precision Library GNU Multiple Precision Arithmetic Library (GMP) is a free library for arbitrary-precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers. There are no practical limits to the precision except the ones imp ...
*
GNU Octave GNU Octave is a high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a langu ...
*
LEMON The lemon (''Citrus limon'') is a species of small evergreen trees in the flowering plant family Rutaceae, native to Asia, primarily Northeast India (Assam), Northern Myanmar or China. The tree's ellipsoidal yellow fruit is used for culin ...
* LiquidFeedback *
Mozilla Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, w ...
(also uses Git/
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continu ...
) *
Nginx Nginx (pronounced "engine x" ) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software ...
*
Orthanc In J. R. R. Tolkien's fantasy writings, Isengard () is a large fortress in Nan Curunír, the Wizard's Vale, in the western part of Middle-earth. In the fantasy world, the name of the fortress is described as a translation of Angrenost, a word ...
* Pidgin *
PyPy PyPy () is an implementation of the Python programming language. PyPy often runs faster than the standard implementation CPython because PyPy uses a just-in-time compiler. Most Python code runs well on PyPy except for code that depends on CPyth ...
* RhodeCode * Roundup * Tryton * WinDirStat *
wmii In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more common approach (used by stacking window managers) of coordinate-based stacking of overlap ...
*
XEmacs XEmacs is a graphical- and console-based text editor which runs on almost any Unix-like operating system as well as Microsoft Windows. XEmacs is a fork, based on a version of GNU Emacs from the late 1980s. Any user can download, use, and modify X ...
*
Xine xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library (xine-lib) that supports different frontend player applications. xine uses libraries ...


See also

*
Comparison of version-control software In software development, version control is a class of systems responsible for managing changes to computer programs or other collections of information such that revisions have a logical and consistent organization. The following tables inclu ...
*
Distributed version control In software development, distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centr ...
* List of version-control software


Notes


References


External links

* * , freely available online * * covering both basic and advanced use * * *
List of projects using Mercurial from the Mercurial wiki
* {{Revision control software 2005 software Cross-platform free software Distributed version control systems Free software programmed in C Free software programmed in Python Free version control software Version control systems