Skip to main content

hg-setup: easily setup Mercurial with a tiny Python application

Latest version Supported Python versions Heptapod CI Github Actions

hg-setup can be used to setup Mercurial. The main command provided by this package, hg-setup init, launches a simple Terminal User Interface (TUI) to initialize a reasonable user configuration file and shell completion for bash and zsh.

With UV, one can even run it without installation with:

uvx hg-setup init

Background

Mercurial is a Python application using C and Rust extensions. It is extendable with Mercurial extensions and two Python packages provide very useful Mercurial extensions that most users should use : hg-git (Mercurial extension hggit) and hg-evolve (Mercurial extensions topic and evolve).

These things are packaged in 3 PyPI packages (associated with their equivalent conda-forge packages): mercurial, hg-git, hg-evolve. Moreover, to use Mercurial extensions, one has to write few lines in a configuration file (~/.hgrc).

Mercurial with hg-git and hg-evolve is great but it is a bit difficult to setup for beginners. hg-setup is there to help people to start with Mercurial and finalize its installation.

Install

Here, we give commands to install in two isolated environment on one side Mercurial and its more useful extensions (hg-git and hg-evolve) and on the other side hg-setup.

From the package on PyPI

pipx install mercurial
pipx inject mercurial hg-git hg-evolve
pipx install hg-setup
uv tool install mercurial --with hg-git --with hg-evolve
uv tool install hg-setup

From the conda-forge package

conda activate base
pip install conda-app
conda-app install mercurial
conda-app install hg-setup
pixi global install mercurial --with hg-git --with hg-evolve
# and then
pixi global install hg-setup

From source

pipx install hg-setup@hg+https://foss.heptapod.net/fluiddyn/hg-setup

For development installation, see the file CONTRIBUTING.md.

User interfaces

The ~/.hgrc file and shell completion for bash and zsh can be initialized with a simple Terminal User Interface (TUI):

hg-setup init

We can also avoid the TUI with

hg-setup init --name "Alice Lastname" --email alice.lastname@proton.me --auto

The shell completion for bash and zsh can be initialized with:

hg-setup init-shell-completion bash
hg-setup init-shell-completion zsh

Release files for hg-setup 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hg-setup 0.1.5
File Size Uploaded
hg_setup-0.1.5.tar.gz 25.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hg-setup 0.1.5
File Interpreter ABI Platform
hg_setup-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 kB

Release files / hg_setup-0.1.5.tar.gz

Download URL hg_setup-0.1.5.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
974e8b39daeec5026bf36c3af7f11b190f10cd93fb563ad9debe58ce15f4fde4
BLAKE2b-256 checksum
How to use checksums
17b3b6010a65243e3a380ba712ffc3b05a67cb495b9cd905904a6c89cbabb0b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release files / hg_setup-0.1.5-py3-none-any.whl

Download URL hg_setup-0.1.5-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82688fb87620c4006db16ee16f2d9d982e770071c550133bdfd731f54ad9c853
BLAKE2b-256 checksum
How to use checksums
6fc423c4bdf1ee9b007ef547ff99fbe56c097be368274b38f23315cfa4016b4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page