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 developer Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development invo ...
s. It is supported on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
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 FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
,
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 la ...
, 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, whi ...
. 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 Subversion () refers to a process by which the values and principles of a system in place are contradicted or reversed in an attempt to transform the established social order and its structures of power, authority, hierarchy, and social norms ...
. 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, ins ...
extensions are available, e.g.
TortoiseHg __NOTOC__ TortoiseHg is a GUI front-end for Mercurial that runs on Microsoft Windows (on which it integrates directly with File Explorer), Mac OS X, and Linux. It is written in PyQt (except the Windows shell extension), and the underlying c ...
, 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 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, n ...
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 sof ...
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 The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
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 Below may refer to: *Earth * Ground (disambiguation) *Soil *Floor * Bottom (disambiguation) *Less than *Temperatures below freezing *Hell or underworld People with the surname *Ernst von Below (1863–1955), German World War I general *Fred 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 hexa ...
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 where the protocol is very similar to the HTTP-based protocol. By default it uses a
3-way merge In version control, merging (also called integration) is a fundamental operation that reconciles multiple changes made to a version-controlled collection of files. Most often, it is necessary when a file is modified on two independent branches an ...
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, Dust ...
, the W3C, 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, ...
. Facebook is using the Rust programming language 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 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 lan ...
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 * Phabricator by Phacility *
RhodeCode RhodeCode is an open source self-hosted platform for behind-the-firewall source code management. It provides centralized control over Git, Mercurial, and Subversion repositories within an organization, with common authentication and permission man ...
by RhodeCode Inc.


Source code hosting

The following websites provide free source code hosting for Mercurial repositories: * Bitbucket 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 lan ...
for Octave-related software and package

* GNU Savannah 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 * 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 Multi-Precision Library *
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 lan ...
*
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, ...
(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, cont ...
) *
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 softw ...
*
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 A pidgin , or pidgin language, is a grammatically simplified means of communication that develops between two or more groups of people that do not have a language in common: typically, its vocabulary and grammar are limited and often drawn from s ...
* PyPy *
RhodeCode RhodeCode is an open source self-hosted platform for behind-the-firewall source code management. It provides centralized control over Git, Mercurial, and Subversion repositories within an organization, with common authentication and permission man ...
* Roundup *
Tryton ''Tryton'' is a three-tier high-level general purpose computer application platform on top of which is built an Enterprise resource planning (ERP) business solution through a set of Tryton modules. The three-tier architecture consists of the T ...
*
WinDirStat WinDirStat is a free and open-source graphical disk usage analyzer for Microsoft Windows. It presents a sub-tree view with disk-use percentage alongside a usage-sorted list of file extensions that is interactively integrated with a colorful graphi ...
* wmii *
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


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 *
List of version-control software This is a list of notable software for version control. Local data model In the local-only approach, all developers must use the same file system. Open source * Revision Control System (RCS) – stores the latest version and backward del ...


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