Mercurial

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

Mercurial
New Mercurial logo.svg
Developer(s) Matt Mackall
Initial release 19 April 2005; 19 years ago (2005-04-19)[1]
Stable release 3.6.2[2] / 1 December 2015; 8 years ago (2015-12-01)
Written in Python and C
Operating system Unix-like, MS Windows, Mac OS X
Type Revision control
License GNU GPL v2+
Website www.mercurial-scm.org

Mercurial is a cross-platform, distributed revision control tool for software developers. It 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 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 the chemical symbol of the element mercury.

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.[3] It includes an integrated web interface. Mercurial has also taken steps to ease the transition for users of other version control systems, particularly Subversion.

The creator and lead developer of Mercurial is Matt Mackall. Mercurial is released as free software under the terms of the GNU GPL v2 (or any later version[4]).

History

Mackall first announced Mercurial on 19 April 2005.[1] 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.[5]

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

In an answer on the Mercurial mailing list, Matt Mackall explained how the name "Mercurial" was chosen:[7]

<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.

In 2013, Facebook adopted Mercurial and began work on scaling it to handle their large, unified code repository.[8]

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.

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

Related software

Screenshot of hgk in action
Screenshot of TortoiseHg client history
  • GUI interfaces for Mercurial include:
    TortoiseHg
    TortoiseHg is a cross-platform GUI for Mercurial. Most Mercurial operations can be invoked from the graphical interface. It can be used stand-alone on Windows, Mac OS X, or Linux.[9] It can also be integrated with Windows Explorer[10] and GNOME Nautilus.[11] On Windows, the TortoiseHg installer bundles Mercurial and Python.
    MacHg
    MacHg is a free and fast multithreaded front end for Mac OS X 10.6 and later.[12]
    SourceTree
    A freeware Mac OS X and Windows GUI client developed by Atlassian that works with both Mercurial and Git.[13]
    Hgk
    This was the original log viewer for Mercurial. It is implemented as a Mercurial extension with a tcl/tk frontend. It was originally based on a similar tool for Git called gitk. This viewer is now considered an unloved feature.[14] Recommended alternatives are hgview[15] or TortoiseHg.
    Murky
    A Mac OS X GUI in Objective-C 2.0, runs on Mac OS X 10.5 and later.[16]
    MacMercurial
    A Mac OS X GUI "not intended to completely replace command line use of Mercurial, only to ease the most common Mercurial operations," for Mac OS X 10.4 or later.[17]
    EasyMercurial
    A simple user interface for the Mercurial distributed version control system. It's free, open source, and cross-platform.[18]
    hgtui
    A free TUI client for Linux and Windows (using cygwin).[19]
  • Related tools for merging include (h)gct (Qt) and Meld.[20]
  • The convert extension allows import from CVS, Darcs, Git, GNU Arch, Monotone, Perforce, Bazaar and Subversion repositories.
  • Microsoft Visual Studio supports Mercurial with the VisualHG[21] and HgSccPackage[22] plugins.
  • NetBeans supports Mercurial from Version 6.
  • Eclipse supports Mercurial with the MercurialEclipse[23] plugin.
  • GNU Emacs has support for Mercurial in its VC extension.

Adoption

Although Mercurial was not selected to manage the Linux kernel sources, it has been adopted by several organizations, including Facebook,[24] the W3C, and Mozilla.

Source code hosting

<templatestyles src="Module:Hatnote/styles.css"></templatestyles>

The following websites provide free source code hosting for Mercurial repositories:

Open source projects using Mercurial

Some projects using the Mercurial distributed RCS:[28]

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

See also

References

  1. 1.0 1.1 Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found..
  3. Lua error in package.lua at line 80: module 'strict' not found..
  4. Lua error in package.lua at line 80: module 'strict' not found..
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. http://jasonfharris.com/machg/
  13. http://www.sourcetreeapp.com/
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. http://www.logilab.org/project/hgview
  16. http://bitbucket.org/snej/murky/wiki/Home
  17. http://www.jwwalker.com/pages/macmerc.html
  18. http://easyhg.org/
  19. https://code.google.com/p/hgtui/
  20. http://meld.sourceforge.net/
  21. http://visualhg.codeplex.com/
  22. http://bitbucket.org/zzsergant/hgsccpackage/
  23. http://www.javaforge.com/project/HGE
  24. Lua error in package.lua at line 80: module 'strict' not found.
  25. Lua error in package.lua at line 80: module 'strict' not found.
  26. Lua error in package.lua at line 80: module 'strict' not found.
  27. Lua error in package.lua at line 80: module 'strict' not found..
  28. Lua error in package.lua at line 80: module 'strict' not found..
  29. Lua error in package.lua at line 80: module 'strict' not found..
  30. Lua error in package.lua at line 80: module 'strict' not found.
  31. Lua error in package.lua at line 80: module 'strict' not found.
  32. Lua error in package.lua at line 80: module 'strict' not found.
  33. Lua error in package.lua at line 80: module 'strict' not found.
  34. Lua error in package.lua at line 80: module 'strict' not found.
  35. Lua error in package.lua at line 80: module 'strict' not found.
  36. Lua error in package.lua at line 80: module 'strict' not found.
  37. Lua error in package.lua at line 80: module 'strict' not found.

External links

  • No URL found. Please specify a URL here or add one to Wikidata.
  • Lua error in package.lua at line 80: module 'strict' not found., freely available online
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found. covering both basic and advanced use
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • Lua error in package.lua at line 80: module 'strict' not found.
  • List of projects using Mercurial from the Mercurial wiki