mercurial
Fast scalable distributed SCM (revision control, version control) system
What it is and what it does
Mercurial is a mature, distributed revision control system designed for software developers and system administrators to track code changes across teams and repositories. It operates as both a command-line tool (hg) and a Python library, allowing developers to manage version history, branching, merging, and collaboration without a central server dependency.
The package includes pre-built wheels across Windows, macOS, and Linux platforms, with no external runtime dependencies. It ships with an embedded copy of python-zstandard for compression support and is actively maintained with current Python version support. The tool is intended for integration into development workflows and can be used standalone or embedded in other applications.
Use it for:
- Track code changes and maintain version history in a distributed team environment without requiring a central server
- Manage branching and merging workflows for parallel development on multiple features or releases
- Integrate version control operations into Python applications via the mercurial library API
- Migrate from or work alongside other version control systems in heterogeneous development environments
- Audit and review historical changes to source code across a project's lifetime
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Mercurial is a distributed version control system that tracks and manages changes to source code across multiple developers and repositories.
Yes, if you need a distributed version control system and prefer Mercurial's workflow or are maintaining existing Mercurial repositories. The package is actively maintained, has no known vulnerabilities, and supports current Python versions. However, consider your team's existing tooling; install Mercurial only if you have a specific reason to use it.
Install
mercurial on PyPI
pip
pip install mercurialuv
uv add mercurialpoetry
poetry add mercurialInstalling mercurial
Before you install
Medium install friction due to compiled components across multiple platforms (Windows, macOS, Linux variants). Active maintenance with a release 3 days old and support for current Python versions. No runtime dependencies to manage.
License in practice
Licensed under GPL-2.0-or-later (copyleft). Derivative works and distributions must comply with GPL terms, including source code disclosure obligations.
Quickstart
pip install mercurial
import mercurial
# Or use the command-line tool: hg init, hg add, hg commit
Requires Python 3.9 or later. System C compiler may be needed if pre-built wheels are unavailable for your platform.
Verify before relying
- Whether the bundled python-zstandard copy can be safely updated or must remain as-is for production stability
- Performance characteristics compared to other distributed VCS tools in typical workflows
Package facts
| License | GPL-2.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 3 days since the last release |
| First released | |
| Downloads | 403,292/month — #6,918 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mercurial-7.2.4-cp310-cp310-macosx_10_9_universal2.whl; mercurial-7.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl; mercurial-7.2.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; mercurial-7.2.4-cp310-cp310-musllinux_1_2_i686.whl; mercurial-7.2.4-cp310-cp310-musllinux_1_2_x86_64.whl; mercurial-7.2.4-cp310-cp310-win32.whl; mercurial-7.2.4-cp310-cp310-win_amd64.whl; mercurial-7.2.4-cp311-cp311-macosx_10_9_universal2.whl; mercurial-7.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl; mercurial-7.2.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; mercurial-7.2.4-cp311-cp311-musllinux_1_2_i686.whl; mercurial-7.2.4-cp311-cp311-musllinux_1_2_x86_64.whl; mercurial-7.2.4-cp311-cp311-win32.whl; mercurial-7.2.4-cp311-cp311-win_amd64.whl; mercurial-7.2.4-cp311-cp311-win_arm64.whl; mercurial-7.2.4-cp312-cp312-macosx_10_13_universal2.whl; mercurial-7.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl; mercurial-7.2.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; mercurial-7.2.4-cp312-cp312-musllinux_1_2_i686.whl; mercurial-7.2.4-cp312-cp312-musllinux_1_2_x86_64.whl
Tags
More Version Control packages
Automatically extracts and manages Python…
permissive · top 1,000 on PyPI
dulwichDulwich provides pure Python access to Git…
unclear · top 1,000 on PyPI
setuptools-rustsetuptools-rust is a setuptools plugin that…
permissive · top 5,000 on PyPI
pygit2pygit2 provides Python bindings to libgit2,…
copyleft · top 5,000 on PyPI
poetry-dynamic-versioningA Poetry plugin that automatically derives and…
permissive · top 5,000 on PyPI
whatthepatchParses and applies patch files in multiple diff…
permissive · top 5,000 on PyPI
python-hglibpython-hglib provides a Python interface to…
permissive · top 15,000 on PyPI
vcstoolvcstool is a command-line tool that manages…
permissive · top 15,000 on PyPI
versioningitAutomatically determines your Python package's…
permissive · top 5,000 on PyPI
hatch-vcsA Hatch plugin that automatically determines…
permissive · top 1,000 on PyPI
setuptools-scm-git-archiveA setuptools_scm plugin that extracts version…
permissive · top 5,000 on PyPI
versioneerVersioneer automates version management in…
permissive · top 5,000 on PyPI
conanConan is a decentralized, open-source package…
permissive · top 5,000 on PyPI
scmreposcmrepo provides an fsspec-based filesystem…
permissive · top 5,000 on PyPI
dunamaiDunamai generates dynamic, standards-compliant…
permissive · top 5,000 on PyPI