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.2.tar.gz (24.4 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.2-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hg_setup-0.1.2.tar.gz
  • Upload date:
  • Size: 24.4 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.2.tar.gz
Algorithm Hash digest
SHA256 6f8d1993dbcca0b98e47756182517f33588557fb2900742c78d77d9bee9023c8
MD5 777d3b2f30770cfd9c7b24e9b16c78e2
BLAKE2b-256 973a7e1981eda2502a9de04d1abc4d3073389419dcba0fbd5bd2e00fbc973898

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hg_setup-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 25.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ff210702d7a0b5a8bef32297ce91f75257006ca00f24e692e0b66b5bed9478c1
MD5 c5ed604ad75e0ab83194a1ae43232b6a
BLAKE2b-256 1b4267b4b960ff55f57b9b9efe2379a0f65b547da4c2f7e7904121e2e035a6d5

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