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

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.

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. hg-setup is there to help people to start with Mercurial and finalize its installation.

Install

Currently, only installation from source works.

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 (https://foss.heptapod.net/fluiddyn/conda-app)
conda-app install mercurial
# this requires optional deps on conda-forge
pixi global install mercurial[full]

However, we are not yet there. Nevertheless, this will work very soon (once hg-setup is on PyPI)

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

and this will work soon (once hg-setup is on conda-forge and mercurial-app has been modified).

conda-app install mercurial
pixi global install mercurial-app
pixi global install mercurial --with hg-git --with hg-evolve --with hg-setup

Note that this will soon work too, independently of how Mercurial is installed:

uvx hg-setup init

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.0.tar.gz (24.1 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.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hg_setup-0.1.0.tar.gz
  • Upload date:
  • Size: 24.1 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.0.tar.gz
Algorithm Hash digest
SHA256 8f93caf97dcf1d154e1fdbb45ff908346f67e344ad230734c5fd1fcbfe3f0361
MD5 fba35aefac798f955646380668e7051b
BLAKE2b-256 071b8f70b76e1ea0e776afe9d37060ee6173d6dee37beef2b0fa3c76b194b461

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hg_setup-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb61f5fba2f3384ba0469c327cceb2d5952d97b0cd93e2b88b0fd58626ac647c
MD5 b09b398e343fdf54a2ece0c89dfbe05a
BLAKE2b-256 1c699fc9f0df6c71af786b0eb886df5554a60c1a445240a424a44bc1be56fb51

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