Can I install Mercurial in my home directory?
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;
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.
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.eggmkdir -p ~/software/lib/python2.5/site-packagesexport PYTHONPATH=~/software/lib/python2.5/site-packagessh setuptools-0.6c11-py2.5.egg --prefix=~/softwareexport PATH=${PATH}:~/software/bineasy_install --prefix=~/software docutilscd ~/softwarewget https://www.mercurial-scm.org/release/mercurial-2.5.2.tar.gztar xzvf mercurial-2.5.2.tar.gzcd mercurial-2.5.2.tar.gzpython setup.py --pure install --home="~/software" --forcecd ~/software/lib/pythonmv 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-packagesexport PATH=${PATH}:~/software/bin
Check:
~$ hgMercurial Distributed SCMetc...
Linux
The Mercurial source comes with a Makefile
that has a local
target. If you run this, then you'll build the C extensions in-place:
$ make local... (lots of output) ...python hg versionMercurial Distributed SCM (version 5b66e55c0d93+20111216)(see https://www.mercurial-scm.org for more information)Copyright (C) 2005-2011 Matt Mackall and othersThis is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You will need the Python header files, they typically come in a python-dev
package. You can then symlink the hg
script into a directory in your PATH
. I use ~/bin
for this:
$ cd ~/bin$ ln -s ../src/mercurial/hg
You can now run hg
from any directory.
If you want to uninstall Mercurial, it's as simple as deleting the directory where you did the compile. Upgrading is also easy: unpack a new release in the directory and run make local
again. You can also use the newly install Mercurial to clone the Mercurial repository itself:
$ hg clone https://www.mercurial-scm.org/repo/hg$ cd hg$ make local
This gives you a version of Mercurial from the default
branch. Use hg update stable
before compiling if you want a build from the stable
branch instead. That branch is only updated with bugfixes.
Windows
On that platform, you can use a the Inno setup installers. They do not require admin rights. You can couple that with a portable version of TortoiseHg if you like.