Mercurial (hg) Installation Without Being Root: Unterschied zwischen den Versionen

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen
K
K
Zeile 1: Zeile 1:
  
Solutions for installing mercurial from a package repository or via a self-extracting or any other installer in any operating system distribution can easily be found.
+
Solutions for installing mercurial from a package repository or via a self-extracting or any other installer for all operating system distribution can easily be found. So this is not the topic of thise Wiki entry. Here we cover the installation of a mercurial versioning system without root access. It is a necessary step for the creation of our synergetic hard and software development system that at a later point shall be mirrored by the Wiki to keep it up to date and to keep development efforts bundled in our versioning system (mercurial, git, svn, bzr, ...).
  
  
Zeile 38: Zeile 38:
  
 
To fix this:
 
To fix this:
 +
 
<code>
 
<code>
 
$  tar -xvf mercurial_bundled_python.tar.gz
 
$  tar -xvf mercurial_bundled_python.tar.gz
Zeile 45: Zeile 46:
 
$ cd mercurial_bundled_python/
 
$ cd mercurial_bundled_python/
 
</code>
 
</code>
 +
 +
either
  
 
<code>
 
<code>

Version vom 12. Januar 2014, 16:35 Uhr

Solutions for installing mercurial from a package repository or via a self-extracting or any other installer for all operating system distribution can easily be found. So this is not the topic of thise Wiki entry. Here we cover the installation of a mercurial versioning system without root access. It is a necessary step for the creation of our synergetic hard and software development system that at a later point shall be mirrored by the Wiki to keep it up to date and to keep development efforts bundled in our versioning system (mercurial, git, svn, bzr, ...).


With a Python installation readily available or with rights to install a python environment:

If a python installation is available or you have a server where you have adminsitrative rights for installing the python and still want to have a local installation of mercurial into your home directory, this also is no problem by using the Mercurial script: make install-home (to include documentation) or make install-home-bin (for the executable only). If you used a custom python location for the script it is required to add the following to the command to communicate it to hg:

$ PYTHON=/path/to/python2.4-or-newer

$ make install-home

Source: http://mercurial.selenic.com/wiki/UnixInstall#Per-user_installation


Without Root access and no Python available:

To install mercurial without being root, needs us to bundle Python 2.x (as Python 3 is not yet supported as there is only one advantage in favour of upgrading, so it's not worth the effort currently).

Windows

For Windows there currently is PortablePython as a ready made option.

UNIX

For UNIX systems (Mac OS, GNU/Linux, Android, ...) or FreeBSD there are some packages floating around in the net, but it's sometimes hard to find the correct one for a certain architecture and operating system (what is needed to match the server's arch and os).

So if you have a system similar to the web server available where you have root access, the following is an option of how to get a working mercurial and python.

Virtual / bundled installation of Python

To create a virtual/bundled installation of Python and Mercurial there are two or more quite similar ways.

We will proceed in adapting this splendid blog entry of Fabrizio: https://weblogs.java.net/blog/fabriziogiudici/archive/2009/07/installing_merc.html .

For now it turned out that the blog post is no longer up to date as there will not be a binary for mercurial, namely 'python2/bin/hg' is missing.

To fix this:

$ tar -xvf mercurial_bundled_python.tar.gz

$ cd mercurial_bundled_python/

either

$ make install-home-bin

$ hg # should show version

or

$ make local # build for inplace usage

$ ./hg --version # should show the latest version