Mercurial

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Script error: No such module "about". Template:Use dmy dates Script error: No such module "Infobox".Template:Template other Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters".

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.[1] 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 MackallTemplate:Efn 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.[2] 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.[3] 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.[4]

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:

<templatestyles src="Template:Blockquote/styles.css" />

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.[5][6]

Script error: No such module "Check for unknown parameters".

High-profile projects such as the OpenJDK have used Mercurial in the past, though the OpenJDK no longer does as of Java 16.[7]

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.

File:Mercurial commandd and their relations.png
Figure 1: Some important operations of Mercurial and their relations.

Adoption

Although Mercurial was not selected to manage the Linux kernel sources, it was adopted by several organizations. Facebook is using the Rust programming language to write Mononoke,[8][9] 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.[10]

Google also uses Mercurial client as a front-end on their cloud-based 'Piper' monorepo back-end.[11]Script error: No such module "Unsubst".

Bitbucket announced that its web-based version control services would end support for Mercurial in June 2020 (then extended to July 2020),[12] explaining that "less than 1% of new projects use it, and developer surveys indicated that 90% of developers use Git".[13]

Xen used Mercurial for many years, but moved to Git in 2013.[14]

Mozilla used Mercurial for many years, but started moving to end support for Mercurial in 2023.[15]

Mercurial servers and repository management

Source code hosting

Script error: No such module "Labelled list hatnote". The following websites provide free source code hosting for Mercurial repositories:

Mercurial website mentions some other forges.

Open source projects using Mercurial

Some projects using the Mercurial distributed RCS:[21]

<templatestyles src="Div col/styles.css"/>

Script error: No such module "Check for unknown parameters".

Open source projects formerly using Mercurial

See also

Script error: No such module "Portal".

Notes

Template:Notelist

References

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1"..
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Torvalds has said: "I'm an egotistical bastard, so I name all my projects after myself. First Linux, now git."
  7. a b Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. a b Script error: No such module "citation/CS1".
  14. a b Script error: No such module "citation/CS1".
  15. a b Script error: No such module "citation/CS1".
  16. Script error: No such module "citation/CS1".
  17. Script error: No such module "citation/CS1".
  18. Script error: No such module "citation/CS1".
  19. Script error: No such module "citation/CS1".
  20. Script error: No such module "citation/CS1".
  21. Script error: No such module "citation/CS1"..
  22. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links

Template:Sister project Template:Sister project

  • Script error: No such module "Official website".Script error: No such module "Check for unknown parameters".

Template:Revision control software