Packaging mercurial with conda for easier installation?

Nicolas Pinault nicolasp at aaton.com
Tue Apr 30 14:17:16 UTC 2019


Bonjour Pierre,

Isn't TortoiseHg the only tool needed on Windows ?

Cordialement,
Nicolas

Le 30/04/2019 à 15:21, Pierre Augier a écrit :
>
> Hi all,
>
> I'm a researcher (in fluid dynamics). I also do a bit of teaching and 
> training for students and university staff. My university uses Gitlab 
> (https://gricad-gitlab.univ-grenoble-alpes.fr).
>
> However, I don't like to teach Git to these students and university 
> staff. I tried to explain this opinion here 
> http://www.legi.grenoble-inp.fr/people/Pierre.Augier/mercurial-as-a-great-version-source-control-management-tool-in-academics.html
>
> During most of our courses / training sessions, the people bring their 
> own computers, so we would need to be able to install very easily 
> Mercurial plus some extensions (in particular hg-git and hg-evolve) 
> and some utilities (at least meld). I didn't find a very simple way to 
> do that. The methods depend on the system (we have of course a lot of 
> Windows 7 and 10 and macOS) and involve looking at web pages, 
> downloading the right files by clicking on the right links, executing 
> the installation executables, etc. During a course / training session, 
> such process is long and error prone. On Windows, one even needs to 
> install Visual Studio to compile dulwich (needed for hg-git)!
>
> During these courses, everyone has conda installed. conda-forge 
> (https://github.com/conda-forge/) and conda 
> (https://github.com/conda/conda) are good open-source tools to build 
> packages for different platforms and to install them in controlled 
> environments.
>
> As of today, one can run (see 
> https://github.com/conda-forge/mercurial-app-feedstock)
>
> conda config --add channels conda-forge
> conda create -n env_hg mercurial-app
> conda activate env_hg
> pip install hg+https://bitbucket.org/durin42/hg-git
>
> We need to install hg-git with pip + bitbucket because of an 
> incompatibility between Mercurial 4.9.1 and the version of hg-git on 
> PyPI. As soon as a new version will be released, we won't need that.
>
> This should work on Windows, macOS and Linux with no compilation 
> during the installation.
>
> However, at this point, hg is available only in the conda environment 
> env_hg and one needs to work more to get it installed "system wide". 
> For Unix and bash, one can do
>
> APP_DIR=$HOME/.local/bin/conda-app/
> mkdir -p $APP_DIR
> echo -e "\nexport PATH=\$PATH:$APP_DIR\n" >> ~/.bashrc
> ln -s $(which hg) $APP_DIR/hg
>
> First, I don't know if it is a right way to do that (?). More 
> importantly, this is not at all satisfactory (too complicated for 
> beginners, not cross-platform, shell dependent).
>
> By the way, what would be the right way to do this on Windows?
>
> I think it would be possible and useful to work to get something like 
> this to work anywhere (in particular also on Windows and also with 
> other shells):
> conda config --add channels conda-forge
> conda install conda-app
> conda-app install mercurial
>
> Note that conda-app doesn't exist yet (see 
> https://github.com/conda/conda/issues/8556).
>
> Any feedback on this issue and this possible solution ?
>
> Cheers,
>
> Pierre
>
> -- 
> Pierre Augier - CR CNRShttp://www.legi.grenoble-inp.fr
> LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
> BP53, 38041 Grenoble Cedex, France                tel:+33.4.56.52.86.16
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20190430/0b256dd7/attachment-0002.html>


More information about the Mercurial mailing list