Jump to content

Mercurial

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Cybercobra (talk | contribs) at 08:46, 7 October 2009 (shorten). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Mercurial
Developer(s)Matt Mackall
Stable release
1.3.1 / July 23, 2009 (2009-07-23)
Repository
Written inPython and C
Operating systemUnix-like, Windows, Mac OS X
TypeRevision control
LicenseGPL v2
Websitemercurial.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. Mercurial was initially written to run on Linux. It has been ported to Windows, Mac OS X, and most other Unix-like systems. Mercurial is primarily a command line program but graphical user interface extensions are available. All of Mercurial's operations are invoked as keyword options 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.[1] It includes an integrated web interface.

The creator and lead developer of Mercurial is Matt Mackall. The source code is available under the terms of the GNU General Public License version 2, qualifying Mercurial as free software.

Technical information

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.

Documentation

A comprehensive reference manual, Mercurial: The Definitive Guide,[2] has been written by Bryan O'Sullivan. The manual is freely available under the terms of the Open Publication License.

History

Mackall first announced Mercurial on April 19, 2005.[3] 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, started 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).

Screenshot of hgk in action
  • GUI interfaces for Mercurial include Hgk (tcl/tk). This is implemented as a Mercurial extension, and is part of the official version. This viewer displays the directed acyclic graph of the changesets of a Mercurial repository. This viewer can be invoked via the command 'hg view', if the extension is enabled. hgk was originally based on a similar tool for git called gitk. There is an hgk replacement named hgview that is written in pure python and provides both gtk and qt interfaces.
  • Related tools for merging include (h)gct (Qt) and Meld.
  • The convert extension allows import from CVS, Darcs, git, GNU Arch, Monotone, Perforce, Bazaar and Subversion repositories.
  • NetBeans supports Mercurial from Version 6.
  • TortoiseHg provides a user-friendly, right-click menu interface for Windows and GNOME's Nautilus file manager.

Adoption

Source code hosting

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

Projects using Mercurial

Some projects using the Mercurial distributed RCS:[6]

The developers of the Python programming language have announced that they will transition from Subversion to Mercurial. However, as of September 2009 the timeframe is not fixed because the transition team is waiting for hgsubversion to develop.[needs update][14][15]

See also

References

  1. ^ Matt Mackall, Towards a Better SCM: Revlog and Mercurial, Ottawa Linux Symposium Proceedings, 2006.
  2. ^ Bryan O'Sullivan (2007-01-01). Mercurial: The Definitive Guide.
  3. ^ Mackall, Matt (2005-04-20). "Mercurial v0.1 - a minimal scalable distributed SCM". Linux kernel (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  4. ^ Mackall, Matt (2005-04-29). "Re: Mercurial 0.4b vs git patchbomb benchmark". Linux kernel (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  5. ^ "Google Code Blog: Mercurial Now Available to All Open Source Projects". 2009-05-28.
  6. ^ Some projects that use Mercurial
  7. ^ J. Paul Reed (2007-04-12). "Version Control System Shootout Redux Redux".
  8. ^ James Gosling (2006). "James Gosling on Open Sourcing Sun's Java Platform Implementations, Part 1" (Interview). Interviewed by Robert Eckstein. {{cite interview}}: Unknown parameter |month= ignored (help)
  9. ^ "OpenSolaris SCM Project History". 2006-10-05.
  10. ^ David Wood (2009-04-06). "We decided in the end to use Mercurial rather than Git". Retrieved 2009-05-07.
  11. ^ Ian Pratt (2005-07-01). "mercurial now live". Xen-devel (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  12. ^ Timo Sirainen (2007-05-19). "CVS to Mercurial switch". Dovecot-news (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  13. ^ "Switch to hg.netbeans.org completed". 2008. {{cite web}}: Unknown parameter |month= ignored (help)
  14. ^ Guido van Rossum (2009-03-30). "And the winner is..." Python-Dev (Mailing list). {{cite mailing list}}: Unknown parameter |mailinglist= ignored (|mailing-list= suggested) (help)
  15. ^ Python PEP 385 with Timeline TBD (As of September 2009