Developer(s) | Olivia Mackall [a] (retired), [1] Pierre-Yves David |
---|---|
Initial release | 19 April 2005 [2] |
Stable release | |
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.
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.
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.
Figure 1 shows some of the most important operations in Mercurial and their relations to Mercurial's concepts.
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]
The following websites provide free source code hosting for Mercurial repositories:
Mercurial website mentions some other forges.
Some projects using the Mercurial distributed RCS: [24]
BitKeeper is a discontinued 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 under the Apache-2.0 license on 9 May 2016. BitKeeper is no longer being developed.
Monotone is an open source software tool for distributed revision control. It tracks revisions to files, groups sets of revisions into changesets, and tracks history across renames. The focus of the project is on integrity over performance. Monotone is designed for distributed operation, and makes heavy use of cryptographic primitives to track file revisions and to authenticate user actions.
Git is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively.
In software development, distributed version 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 centralized version control, this enables automatic management branching and merging, speeds up most operations, improves the ability to work offline, and does not rely on a single location for backups. Git, the world's most popular version control system, is a distributed version control system.
In software development, a codebase is a collection of source code used to build a particular software system, application, or software component. Typically, a codebase includes only human-written source code system files; thus, a codebase usually does not include source code files generated by tools or binary library files, as they can be built from the human-written source code. However, it generally does include configuration and property files, as they are the data necessary for the build.
A source-code-hosting facility is a file archive and web hosting facility for source code of software, documentation, web pages, and other works, accessible either publicly or privately. They are often used by open-source software projects and other multi-developer projects to maintain revision and version history, or version control. Many repositories provide a bug tracking system, and offer release management, mailing lists, and wiki-based project documentation. Software authors generally retain their copyright when software is posted to a code hosting facilities.
Buildbot is a software development continuous integration tool which automates the compile or test cycle required to validate changes to the project code base. It began as a light-weight alternative to the Mozilla project's Tinderbox, and is now used by Python, WebKit, LLVM, Blender, ReactOS, and many other projects.
The following tables describe attributes of notable version control and software configuration management (SCM) systems that can be used to compare and contrast the various systems.
GNU Bazaar is a distributed and client–server revision control system sponsored by Canonical.
GNU IceCat, formerly known as GNU IceWeasel, is a completely free version of the Mozilla Firefox web browser distributed by the GNU Project. It is compatible with Linux, Windows, Android and macOS.
License compatibility is a legal framework that allows for pieces of software with different software licenses to be distributed together. The need for such a framework arises because the different licenses can contain contradictory requirements, rendering it impossible to legally combine source code from separately-licensed software in order to create and publish a new program. Proprietary licenses are generally program-specific and incompatible; authors must negotiate to combine code. Copyleft licenses are commonly deliberately incompatible with proprietary licenses, in order to prevent copyleft software from being re-licensed under a proprietary license, turning it into proprietary software. Many copyleft licenses explicitly allow relicensing under some other copyleft licenses. Permissive licenses are compatible with everything, including proprietary licenses; there is thus no guarantee that all derived works will remain under a permissive license.
Quilt is a software utility for managing a series of changes to the source code of any computer program. Such changes are often referred to as "patches" or "patch sets". Quilt can take an arbitrary number of patches as input and condense them into a single patch. In doing so, Quilt makes it easier for many programmers to test and evaluate the different changes amongst patches before they are permanently applied to the source code.
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.
TortoiseHg is a GUI front-end for Mercurial that runs on Microsoft Windows, Mac OS X, and Linux.
Unity Version Control is a cross-platform commercial distributed version control tool developed by Códice Software for Microsoft Windows, Mac OS X, Linux, and other operating systems. It includes a command-line tool, native GUIs, diff and merge tool and integration with a number of IDEs. It is a full version control stack not based on Git.
In version control systems, a repository is a data structure that stores metadata for a set of files or directory structure. Depending on whether the version control system in use is distributed, like Git or Mercurial, or centralized, like Subversion, CVS, or Perforce, the whole set of information in the repository may be duplicated on every user's system or may be maintained on a single server. Some of the metadata that a repository contains includes, among other things, a historical record of changes in the repository, a set of commit objects, and a set of references to commit objects, called heads.
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 management. RhodeCode allows forking, pull requests, and code reviews via a web interface.
In version control systems, a commit is an operation which sends the latest changes of the source code to the repository, making these changes part of the head revision of the repository. Unlike commits in data management, commits in version control systems are kept in the repository indefinitely. Thus, when other users do an update
or a checkout
from the repository, they will receive the latest committed version, unless they specify that they wish to retrieve a previous version of the source code in the repository. Version control systems allow rolling back to previous versions easily. In this context, a commit within a version control system is protected as it is easily rolled back, even after the commit has been applied.
In version-control systems, a monorepo is a software-development strategy in which the code for a number of projects is stored in the same repository. This practice dates back to at least the early 2000s, when it was commonly called a shared codebase. Google, Meta, Microsoft, Uber, Airbnb, and Twitter all employ very large monorepos with varying strategies to scale build systems and version control software with a large volume of code and daily changes.
{{cite interview}}
: CS1 maint: unfit URL (link)