Skip to main content

Helper for setting up and configuring Mercurial

Project description

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 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-app
# or (equivalent)
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hg_setup-0.1.3.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hg_setup-0.1.3-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file hg_setup-0.1.3.tar.gz.

File metadata

  • Download URL: hg_setup-0.1.3.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for hg_setup-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a69438bd8dd80fcb4c3d5cff103df63a74c99d2bfd3ab7ba701ab7c20de95ced
MD5 5552f4e51003fd69df807c314a0f93cc
BLAKE2b-256 ff483ddbc81544884616c52de31021abc8326c123e063866b4a09d85c1288870

See more details on using hashes here.

File details

Details for the file hg_setup-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: hg_setup-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for hg_setup-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8ded1cf3b48cc9f5429392d90897cd36ea864882abb99cd4741fdde5f4742b68
MD5 d30207aa07dd5391d95e9bad8942c386
BLAKE2b-256 eccd97cb0188a4908155d0f24c9906f1c5f107875024b97990809addc7658b1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page