Install and setup Mercurial#

Mercurial needs to be installed AND setup. After installation, do not forget to follow the steps presented in the session Setup Mercurial.

Install Mercurial#

With TortoiseHG (simple for Windows)#

Download the installer from https://tortoisehg.bitbucket.io/.

Setup Mercurial#

You need a file ~/.hgrc containing something like this file.

A decent Mercurial configuration file can be created with hg config --edit. Alternatively (recommended for Fluiddyn development), one can use hg-setup to create the user configuration file and initialize shell completion:

hg-setup init

Warning

You should now have a file .hgrc (or mercurial.ini on Windows) in your home directory.

The line starting with hggit is optional and enables the extension hg-git. This extension is useful to work on projects using Git, for example hosted on Github and Gitlab.

The extensions churn, shelve, rebase, absorb, evolve and topic are very useful for more advanced users. Note that evolve and topic comes from the package hg-evolve.

Warning

We wrote a specific Mercurial extension for FluidDyn development called hg-fluiddyn. All FluidDyn contributors / developers / maintainers should install and activate it!

With Mercurial installed with conda-app (as explained above), just run:

conda run -n _env_mercurial pip install hg-fluiddyn

and activate the extension with the line hgfluiddyn = in the file ~/.hgrc.

If Mercurial has been installed with pipx, you can run:

pipx inject mercurial hg-fluiddyn

Warning

For development of FluidDyn packages, the evolve and topic extensions have to be installed and activated! If they are not activated, the hg-fluiddyn extension will warn you!

Check your install#

You can check that Mercurial is correctly setup with

hg version -v
hg debuginstall

When everything is fine, you should be able to clone Git repos with something like:

hg clone https://gricad-gitlab.univ-grenoble-alpes.fr/legi/soft/trokata/softsync-python-debian11.git

or, alternatively and better, but you need to setup a SSH key on https://gricad-gitlab.univ-grenoble-alpes.fr/-/user_settings/ssh_keys (take time to do this since it is really useful!).

hg clone git@gricad-gitlab.univ-grenoble-alpes.fr:legi/soft/trokata/softsync-python-debian11.git