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 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
- With pipx
pipx install mercurial
pipx inject mercurial hg-git hg-evolve
pipx install hg-setup
- With UV
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
- With Pixi
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
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.5.tar.gz.
File metadata
- Download URL: hg_setup-0.1.5.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
974e8b39daeec5026bf36c3af7f11b190f10cd93fb563ad9debe58ce15f4fde4
|
|
| MD5 |
40767868c718a34b1fa02736b95877f3
|
|
| BLAKE2b-256 |
17b3b6010a65243e3a380ba712ffc3b05a67cb495b9cd905904a6c89cbabb0b3
|
File details
Details for the file hg_setup-0.1.5-py3-none-any.whl.
File metadata
- Download URL: hg_setup-0.1.5-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82688fb87620c4006db16ee16f2d9d982e770071c550133bdfd731f54ad9c853
|
|
| MD5 |
76bfb0e21ce7782fab70c451eeefcc35
|
|
| BLAKE2b-256 |
6fc423c4bdf1ee9b007ef547ff99fbe56c097be368274b38f23315cfa4016b4f
|