Support / KnowledgeBase

 
Search the KnowledgeBase Search

Installing Mercurial on the (gs) Grid-Service

  • Applies to: (gs)

  • Difficulty: Medium

  • Time needed: 20 minutes

  • Tools needed: SSH, vi knowledge

 
  • Applies to: (gs)
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH, vi knowledge

Overview

Mercurial is a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects, similar to other 'versioning' tools such as subversion and git.  Please consult Mercurial’s official website for further information.

READ ME FIRST

This article has the following dependencies:

  • Whenever installing third-party software, please consult the official documentation. (mt) Media Temple does not support the installation and configuration of software not installed at time of service activation. Please consult our (gs) Scope of Support page for further explanation.
  • The domain example.com is used as an example. Please be sure to replace this text with the proper information for your site or server.
  • This article assumes that you have already set up git locally on your own computer. Due to the diversity of desktop computer platforms, this article does not cover the steps to get it set up locally.
  • You should also be familiar with connecting via SSH to your server.

Instructions

  1. Log into your (gs) Grid-Service using SSH and change to the data directory by executing:
    cd data 
  2. Download the latest version of Mercurial. You can find this version by going to their latest releases page. To download directly to the data directory, use the wget command, replacing the version with the current version as seen on their website:
    wget http://www.selenic.com/mercurial/release/mercurial-1.2.1.tar.gz  
  3. Extract the files using the tar command and change into the directory:
    tar xzvf mercurial-*.tar.gz  

    cd mercurial-*   
  4. Install the Mercurial files into your home directory located at ~/bin and ~/lib using the following command inside the mercurial directory:
    make install-home   
  5. Add the following lines to the bottom of your ~/.bash_profile file. If the file does not exist, create it:
    export PYTHONPATH=${HOME}/lib/python:$PYTHONPATH
    export PATH=${HOME}/bin:$PATH 

    This command will add those lines for you:

    echo -e 'export PYTHONPATH=${HOME}/lib/python:$PYTHONPATH\nexport PATH=${HOME}/bin:$PATH' >> ~/.bash_profile 
  6. You must now refresh your environment variables for your shell session to register the new settings. This has to be done only once. Type the following:
    source ~/.bash_profile  
  7. Mercurial should now be installed on your (gs) Grid-Service. You can test this by running:
    hg debuginstall
  8. To add a username to remove the No username found message, type the following replacing it with your name and email:
    echo -e '[ui]\nusername = John Doe <john@example.com>' >> ~/.hgrc
  9. Your output after correcting the username error should be similar to:
    example.com@cl25:~/data/mercurial-1.2.1$ hg debuginstall Checking encoding (ascii)...
    Checking extensions...
    Checking templates...
    Checking patch...
    Checking commit editor...
    Checking username...
    No problems detected 

Resources


User Comments

No visitor comments posted. Post a comment
Fields marked with an asterisk(*) are required. Comment on this article
Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue