Mercurial

From Wikipedia, the free encyclopedia
Jump to: navigation, search
This article is about the revision control software. For the metallic element after which it is named, see Mercury (element). For the unrelated corporation, see Mercurial Communications.
Mercurial
New Mercurial logo.svg
Developer(s) Matt Mackall
Initial release 19 April 2005; 9 years ago (2005-04-19)[1]
Stable release 3.2.1[2] / 11 November 2014; 16 days ago (2014-11-11)
Written in Python and C
Operating system Unix-like, MS Windows, Mac OS X
Type Revision control
License GNU GPL v2+
Website mercurial.selenic.com

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

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

Technical information[edit]

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.

History[edit]

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

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

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.

Usage[edit]

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[edit]

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.[7] It can also be integrated with Windows Explorer[8] and GNOME Nautilus.[9] On Windows, the TortoiseHg installer bundles Mercurial and Python, making it a complete environment.
    MacHg
    MacHg is a free and fast multithreaded front end for Mac OS X 10.6 and later.[10]
    SourceTree
    A freeware Mac OS X and Windows GUI client developed by Atlassian that works with both Mercurial and Git.[11]
    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.[12] Recommended alternatives are hgview[13] or TortoiseHg.
    Murky
    A Mac OS X GUI in Objective-C 2.0, runs on Mac OS X 10.5 and later.[14]
    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.[15]
    hgtui
    A freeware TUI client for Linux and Windows (using cygwin).[16]
  • Related tools for merging include (h)gct (Qt) and Meld.[17]
  • 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[18] and HgSccPackage[19] plugins.
  • NetBeans supports Mercurial from Version 6.
  • Eclipse supports Mercurial with the MercurialEclipse[20] plugin.
  • GNU Emacs has support for Mercurial in its VC extension.

Adoption[edit]

Source code hosting[edit]

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

Projects using Mercurial[edit]

Some projects using the Mercurial distributed RCS:[25]

See also[edit]

References[edit]

  1. ^ a b Mackall, Matt (2005-04-20). "Mercurial v0.1 - a minimal scalable distributed SCM". Linux kernel mailing list. http://www.ussg.iu.edu/hypermail/linux/kernel/0504.2/0670.html.
  2. ^ "What’s news", Mercurial (wiki) (3.2.1 ed.), Selenic .
  3. ^ Mackall, Matthew ‘Matt’ (2006), "Towards a Better SCM: Revlog and Mercurial" (PDF), Linux Symposium Proceedings, Ottawa: Selenic .
  4. ^ "Relicensing", Mercurial (wiki), Selenic .
  5. ^ Mackall, Matt (2005-04-29). "Re: Mercurial 0.4b vs git patchbomb benchmark". Linux kernel mailing list. http://lkml.indiana.edu/hypermail/linux/kernel/0504.3/1404.html.
  6. ^ Mackall, Matt (2012-02-15). "Why did Matt choose the name Mercurial?". Mercurial mailing list. http://groups.google.com/group/mercurial_general/browse_thread/thread/737fd2337a7b4b59/90d9fc0f98381fe6?show_docid=9776a64773dedbde. Retrieved 8 March 2012.
  7. ^ "Introduction". TortoiseHg Documentation. Retrieved 23 April 2014. 
  8. ^ "Windows Explorer Integration". TortoiseHg Documentation. Retrieved 23 April 2014. 
  9. ^ "GNOME desktop integration". TortoiseHg Documentation. Retrieved 23 April 2014. 
  10. ^ http://jasonfharris.com/machg/
  11. ^ http://www.sourcetreeapp.com/
  12. ^ "Hgk Extension". Mercurial Wiki. Retrieved 23 April 2014. 
  13. ^ http://www.logilab.org/project/hgview
  14. ^ http://bitbucket.org/snej/murky/wiki/Home
  15. ^ http://www.jwwalker.com/pages/macmerc.html
  16. ^ http://code.google.com/p/hgtui/
  17. ^ http://meld.sourceforge.net/
  18. ^ http://visualhg.codeplex.com/
  19. ^ http://bitbucket.org/zzsergant/hgsccpackage/
  20. ^ http://www.javaforge.com/project/HGE
  21. ^ "CodePlex now supporting native Mercurial". CodePlex (Weblog). Microsoft. 2010-01-22. 
  22. ^ "Mercurial Now Available to All Open Source Projects". Code (blog). Google. 2009-05-28. 
  23. ^ "Git, Mercurial & Subversion hosting". Features. Codebase HQ. 2013-03-04. 
  24. ^ "Hosting", Mercurial (wiki), Selenic .
  25. ^ "Some projects that use Mercurial", Mercurial (wiki), Selenic .
  26. ^ "Source", Adblock+ .
  27. ^ "Source code repositories migrated from Subversion to Mercurial". Coin3D (news). 2010-02-27. 
  28. ^ Sirainen, Timo (2007-05-19). "CVS to Mercurial switch". news mailing list. Dovecot. http://www.dovecot.org/list/dovecot-news/2007-May/000044.html.
  29. ^ "Scaling Mercurial at Facebook". Retrieved 7 January 2014. 
  30. ^ "go-Wiki" (wiki). Google. 
  31. ^ "Mercurial Work Flow" (wiki). Illumos. 2011-03-13. 
  32. ^ Gordon, Ryan C (2010-05-11). "Lugaru goes open source!". Icculus. 
  33. ^ Reed, J Paul (2007-04-12). "Version Control System Shootout Redux Redux". 
  34. ^ "Switch to hg.netbeans.org completed". Net beans. January 2008. 
  35. ^ "Mercurial". Developers. OGRE – Open Source 3D Graphics Engine. 2010-04-04. 
  36. ^ James Gosling (October 2006). Open Sourcing Sun's Java Platform Implementations, Part 1. Interview with Robert Eckstein. Sun. 
  37. ^ "Source Repositories". OpenIndiana. 2011-03-13. 
  38. ^ "Ex Falso / Quod Libet". "Quod Libet uses Mercurial for source control and is hosted on Google Code as well as Bitbucket" 
  39. ^ "RawTherapee". 2010-01-04. 
  40. ^ Wood, David (2009-04-06). "We decided in the end to use Mercurial rather than Git". Symbian. Archived from the original on Apr 14, 2009. Retrieved 2009-05-07. 
  41. ^ "Distributed VCS: On git and mercurial, a transition from SVN". Larroy. 

External links[edit]