ITWissen.info - Tech know how online

Mercurial

Mercurial is a version control system that implements distributed version control. Each user has his or her own local repository, into which the corresponding files and related changes are then entered. Mercurial is platform-independent and is mainly implemented on the basis of the Pythonprogramming language.

The current version (currently version 1.4.2) is available as open source software at the link below. Since the beginning of the development in 2005, among other things initiated by Matt Mackall, a number of well-known open source projects such as NetBeans, Mozilla(Firefox, Thunderbird etc.), OpenSolaris or the Python community have used Mercurial. For development environments like NetBeans or Eclipse a corresponding IDE support is available.

The development of Mercurial

The starting point of the development of Mercurial was that the company Bitmover changed the licensing conditions for their very popular version control system Bitkeeper in such a way that Bitkeeper could no longer be obtained as open source software. This prompted the very active Linux community in particular - which used Bitkeeper in kernel development, among other things - to look for alternatives. Two decisive paths developed from this:

  • with Matt Mackall, who started the development of Mercurial and
  • the way preferred by Linus Thorvald, for the Linux community with Git to develop its own version control system.

to develop. The development of the two systems took place quasi parallel, so that today Mercurial is also used in the kernel development of Linux, although Git is the official standard there.

The goal of Mercurial and Git was ultimately the same - the realization of a Distributed Version Control System(DVCS). Since the developer is not dependent on a network connection, most operations are more efficient than, for example, version control systems such as Concurrent Version System( CVS) or Subversion, since the operations are performed locally. Each developer works on his or her own repository.

Clone architecture of Mercurial

Clone architecture of Mercurial

As can be seen from the illustration, Mercurial creates a clone for the repository on which the user wants to work, i.e. a completely workable copy. This is where revision changes (change sets) or other operations can take place. For the use of a central archive then also a Web interface- with the operation hg serve - is available. Thus arbitrary hierarchies of archives can be represented. However, it is important that each developer knows the infrastructure of the DVCS network. In addition in such a structure naturally more must be "merged" (merged), than with a central version control. But with hgsubversion, an extension is available for read/write access to Subversion repositories.

Mercurial and Python

Mercurial is an implementation in the Python programming language, supplemented by a binary version of the Unix diff program written in the C programming language, for determining the differences between two different files. Basically, version control supports both text and binary files and is independent of the size of a project. The merging of two different file versions into one common file (merging) is realized by Mercurial both automatically and by external programs like KDiFF3, TortoiseMerge, FileMerge or P4Merge. Mercurial is command line oriented and all commands traditionally start with the atomic symbol of mercury hg.

Mercurial is already used by many large open source projects. Now Google also uses Mercurial to organize their code. The main reasons for this decision were Mercurial's simple command set and consequently its ease of learning, as well as its "best protocol and performance characteristics when supporting HTTP", according to a corresponding analysis.

Informations:
Englisch: Mercurial
Updated at: 09.11.2013
#Words: 575
Links: system, user, repository, platform, current
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024