Search code examples
mercurialredhattortoisehg

HG Mercurial tools for RHEL 7


I am having a rather hard time using any hg gui tool in RHEL 7.

For example, when I try to install tortoisehg-3.7.2-1.fc25 , I get an error in the Software installer that states:

Sorry, this did not work. Installation of Mercurial Gui command line tool thg failed.

When I try to use another solution, like smartGui, it complains that I do not have a new version of hg. It needs version >3.3, whereas my version is 2.6.2.

Is there any way I can make either of these two to work? Or does RHEL make you use something else that has legacy support?

hg --version
Mercurial Distributed SCM (version 2.6.2)

python -V
Python 2.7.5

Solution

  • I managed to figure out how to make this work on RHEL 7.

    First, we have to update mercurial to version 3.6.1, as that is what smartGui requires. (It required version 3.3 - 3.6 at the time of posting)

    The full steps to install and update are as follows:

     sudo yum install hg
     sudo yum install rpm-build python-devel python-docutils
     hg clone https://www.mercurial-scm.org/repo/hg
     cd hg
     hg update -r 26890
     cd contrib
     ./buildrpm
    

    At this point, locate the build rpm file and execute it. For me, it was within the ~/hg/contrib/rpmbuild/RPMS/x86_64 directory.

    Now, when you start the SmartGui, simply point hg to the output of the

    whereis hg
    

    command. Most likely, your location is the same as mine, under /usr/bin/hg