---
title: "Mercurial 1.0: the Python DVCS standing alongside Git"
description: "Mercurial 1.0 (March 2008) by Matt Mackall: distributed version control written in Python, GPL licence, pragmatic alternative to Git with a simpler data model. Adoption by Mozilla, OpenJDK, Python, Xen."
url: "https://www.noze.it/en/insights/mercurial-1-0/"
lang: "en"
alternate: "https://www.noze.it/insights/mercurial-1-0/"
published: "2008-03-19"
author: "noze S.r.l."
keywords: "Open Source, R&D, Web, Mercurial, Hg, DVCS, Python, Version Control, Full-Stack"
---

# Mercurial 1.0: the Python DVCS standing alongside Git

Mercurial 1.0 (March 2008) by Matt Mackall: distributed version control written in Python, GPL licence, pragmatic alternative to Git with a simpler data model. Adoption by Mozilla, OpenJDK, Python, Xen.

19 March 2008

## A DVCS written in Python

**Mercurial 1.0** was released on **19 March 2008** by **Matt Mackall**. The project had started in **April 2005** — the same week as Git’s first commit — as the community’s answer to BitKeeper’s abandonment for Linux kernel development. While Linus Torvalds took the path of a ground-up C rewrite, Matt Mackall chose **Python** as main language (with performance-critical modules in C), prioritising **readability** and **extensibility** over raw speed.

Version **1.0** formalises three years of stabilisation: data architecture, user commands, network protocol. It is distributed under **GPLv2** (later GPLv2+ with 2.x).

## Data architecture

Like Git, Mercurial is a **DVCS** — each clone contains the full repository history. Unlike Git, Mercurial’s data model is **more conventional**:

- History as a **DAG** of changesets, each identified by a SHA-1 hash
- **Revlog** as storage format — one append-only file per tracked file + one for the manifest, with incremental deltas
- **Manifest** per changeset — filesystem snapshot at that moment
- **Named branches** as changeset attribute (not movable pointers like Git)
- **Explicit rename and copy tracking**, not inferred by similarity

The result is a system in which common operations are **predictable** and **documentable**. A CVS or Subversion user finds in Mercurial a mental model more accessible than Git’s, with equal distributed power.

## Commands and usability

The main commands — `hg clone`, `hg pull`, `hg push`, `hg commit`, `hg update`, `hg log`, `hg diff`, `hg status`, `hg merge`, `hg branch`, `hg tag` — have **orthogonal** and **consistent** names and semantics. Each command does one thing, without modes (unlike Git, where many commands have flags that radically change behaviour).

**Extensions** (official subsystem, plus third parties) let Mercurial be extended with optional features — _mq_ (Mercurial Queues for patch management), _rebase_, _churn_, _color_, _progress_, _transplant_, _hgk_.

The integrated web interface **hgweb** provides a repository browser without external dependencies.

## Network protocols

Mercurial supports transport via:

- **HTTP(S)** — through `hg serve` or `hgweb` on Apache/Nginx
- **SSH**
- **Local filesystem** (bundle files)

The protocol is **efficient in sending incremental changesets**: initial clones are comparable to Git, subsequent pulls are optimised.

## Institutional adoption

As of 2008 Mercurial has gathered significant adoptions:

- **Mozilla** migrates Firefox and Thunderbird from CVS to Mercurial in 2007-2008
- **OpenJDK** (Sun Microsystems) — migration from 2007
- **Xen** hypervisor
- **Xen Project** repository
- **NetBeans** (Sun)
- Many OCaml, Haskell, scientific projects

The choice is often motivated by a lower **learning curve** vs. Git, the fact that **everyone can read the code** (Python) and contribute to core, and the **API stability** of extensions.

## Bitbucket

In 2008 **Bitbucket** is launched as hosting dedicated to Mercurial — the functional equivalent of GitHub for the Hg world. GitHub/Bitbucket competition is starting to mirror Git/Mercurial competition.

## Graphical tools

The Mercurial ecosystem in 2008-2009 includes:

- **TortoiseHg** — Windows Explorer integration (analogue to TortoiseSVN for SVN)
- **hggit** — extension for Git repository interoperability
- **Kiln** (Fog Creek) — enterprise Mercurial hosting
- **MacHg**, **SourceTree** — graphical clients

## Comparison with Git

Mercurial and Git share the DVCS model and have parallel trajectories. Mercurial’s differentiation points:

- **Simpler data model** — lower learning curve
- **Python extensibility** — custom enterprise plugins simpler
- **Comparable performance** on medium-sized repositories
- **Immutable history by default** — rewriting already-pushed changesets is harder (except via _mq_ or _hg strip_), appreciated where audit trail is critical

## In the Italian context

As of 2008 Italian Mercurial adoption is modest, with usage clusters:

- **University Python research groups** — Mercurial being Python makes it attractive
- **Some software houses** specialised in Java/Python preferring Hg’s usability to Git’s
- **International projects** (Mozilla, OpenJDK, Xen) with Italian contribution

## Historical role

Mercurial 1.0 shows that a quality DVCS can be built with a **high-level interpreted language** without substantial performance compromises. This technical demonstration — that _“Python is fast enough”_ for a demanding application like version control — contributes to consolidating Python as language suited to serious development tooling, not just scripting or scientific research.

Update — 2024

In **2009** **Python itself** adopts Mercurial for the CPython repository, replacing Subversion. **Bitbucket** is acquired by **Atlassian** in 2010 and will add Git support in later years. **Git** prevails in overall adoption, boosted by GitHub’s pull effect: in Italy it establishes itself as dominant between 2010 and 2012. Mercurial retains a consolidated user base in existing projects and environments where its strengths are appreciated. **Facebook/Meta** invests heavily in Mercurial, developing **Sapling** as Mercurial-compatible evolution in the early 2020s for its exceptional-scale monorepo.

---

_References: Mercurial 1.0 (19 March 2008). Matt Mackall. GPLv2 licence. Mozilla, OpenJDK, Xen as early adopters. Bitbucket (2008). TortoiseHg._
