Setting up Mercurial on CentOS x86_64

Mercurial is a badass distributed version control system. Most likely, you know what mercurial is if you’re reading this, so I won’t bother explaining it. If you don’t know what it is, go to hginit.com.

Step 1. Get the RPM of Mercurial for Your Version
I got my package from packages.sw.be/mercurial/. Make sure to choose the right version. I chose mercurial-1.8.2-1.e15.rf.x86_64.rpm, but there may be more up to date versions or more appropriate versions for you.

[root@two twohlix.com]# cd /home
[root@two home]# wget http://packages.sw.be/mercurial/mercurial-1.8.2-1.el5.rf.x86_64.rpm
--2011-05-11 22:17:43--  http://packages.sw.be/mercurial/mercurial-1.8.2-1.el5.rf.x86_64.rpm
Resolving packages.sw.be... 85.13.226.40
Connecting to packages.sw.be|85.13.226.40|:80... connected.
...

Step 2. Install the RPM

[root@two home]# rpm -Uvh mercurial-1.8.2-1.el5.rf.x86_64.rpm
warning: mercurial-1.8.2-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:mercurial              ########################################### [100%]

I used a few options in the install: ‘-U’ upgrades or installs (whichever it has to) the rpm. ‘-v’ makes it verbose so you can see it do things. ‘-h’ adds the #(h for hash) marks so you can see the progress over time.
If you didn’t use your root account for this be sure to use sudo:

[totally_not_root@two home]# sudo rpm -Uvh mercurial-1.8.2-1.el5.rf.x86_64.rpm

Step 3. Check on Mercurial

[root@two home]# hg

that command should result in:

Mercurial Distributed SCM

basic commands:

 add        add the specified files on the next commit
 annotate   show changeset information by line for each file
...

If that happened, you’re all done. You may need to install python if it broke.

One Response to Setting up Mercurial on CentOS x86_64

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>