Helper for setting up and configuring Mercurial
Project description
hg-setup: easily setup Mercurial with a tiny Python application
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 altogether and in an isolated environment Mercurial, its more useful extensions (hg-git and hg-evolve) and hg-setup.
From the package on PyPI
- With pipx
pipx install mercurial
pipx inject mercurial hg-git hg-evolve hg-setup
- With UV
uv tool install mercurial --with hg-git --with hg-evolve --with hg-setup
From the conda-forge package
Soon, there will be a conda-forge package, and one will be able to install Mercurial, hg-git, hg-evolve and hg-setup by running:
conda activate base
pip install conda-app
conda-app install mercurial
- With Pixi
pixi global install mercurial-app
# or (equivalent)
pixi global install mercurial --with hg-git --with hg-evolve --with hg-setup
From source
pipx install hg-setup@hg+https://foss.heptapod.net/fluiddyn/hg-setup
For development installation, see the file CONTRIBUTING.md.
My plans
I hope that ultimately hg-setup can be installed automatically with Mercurial when running install commands like:
# from PyPI
pipx install mercurial[full]
uv tool install mercurial[full]
# with Miniforge (conda-forge) and conda-app
conda-app install mercurial
# this would require optional deps on conda-forge
pixi global install mercurial[full]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hg_setup-0.1.1.tar.gz.
File metadata
- Download URL: hg_setup-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c256774027a81bb409f5a3a95ffa0f71a94501fd3efcf3abde4913e767d5e92
|
|
| MD5 |
df7a66e7a9e5f74dce2d693c04643f02
|
|
| BLAKE2b-256 |
a2195d2cc80561a48c50aa8eeb9cf62825cb84b9ea65be62f58eff568a01c3bf
|
File details
Details for the file hg_setup-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hg_setup-0.1.1-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f321f0dcb488cc9b2ce54461c890e32ae5b028aae3403f6444075e9563eb375
|
|
| MD5 |
74615722185c3a79bb2895ec78a86435
|
|
| BLAKE2b-256 |
bb7465f993fd63e12b5da9ab3188c73ae162451d53b64a8d3e977a418713f60e
|