Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I install Mercurial in my home directory?

I would like to install Mercurial on a Linux system where I don't have root access.

How can I do this in a way so that I can easily uninstall Mercurial again and upgrade it when new versions are released?

Also, can I get a package for Windows that does not require admin rights to install?

like image 496
Martin Geisler Avatar asked Dec 16 '11 16:12

Martin Geisler


2 Answers

Mercurial in home directory, how?

It is very easy to compile and install Mercurial in your home directory, I've done so myself.

This linked wiki-post will certainly provide some aid if you have questions;

  • UnixInstall

Use make install-home to install hg to your home directory, it'll put the binary file in ~/bin and associative files in ~/lib.

When uninstalling or upgrading to a new version you could either delete the files that the makefile have put in, or let make install-home (if upgrading) overwrite the existing files.

Make sure to update your $PATH after installation so that it includes ~/bin.


Install Mercurial on windows without being admin, how?

Following the link below will lead you to the download section of Mercurial. There you'll be able to find installation bundles for Windows that doesn't require administration rights.

  • Download
like image 88
Filip Roséen - refp Avatar answered Oct 05 '22 06:10

Filip Roséen - refp


I'm aware that this question is already answered but someone could be in the situation I was and that is to have to install without C compiler and make.

Install without C compiler and make

Full description of the solution can be found on following link.

List of commands, without using make

wget http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg
mkdir -p ~/software/lib/python2.5/site-packages
export PYTHONPATH=~/software/lib/python2.5/site-packages
sh setuptools-0.6c11-py2.5.egg --prefix=~/software
export PATH=${PATH}:~/software/bin
easy_install --prefix=~/software docutils
cd ~/software
wget https://www.mercurial-scm.org/release/mercurial-2.5.2.tar.gz
tar xzvf mercurial-2.5.2.tar.gz
cd mercurial-2.5.2.tar.gz
python setup.py --pure install --home="~/software" --force
cd ~/software/lib/python
mv hgext/ ../python2.5/site-packages/
mv mercurial ../python2.5/site-packages/
mv mercurial-2.5.2.egg-info ../python2.5/site-packages/

Append following lines to .bashrc:

export PYTHONPATH=~/software/lib/python2.5/site-packages
export PATH=${PATH}:~/software/bin

Check:

~$ hg
Mercurial Distributed SCM
etc...
like image 33
Bula Avatar answered Oct 05 '22 06:10

Bula