适用于 RHEL 7 的 HG Mercurial 工具

HG Mercurial tools for RHEL 7

我很难在 RHEL 7 中使用任何 hg gui 工具。

例如,当我尝试安装 tortoisehg-3.7.2-1.fc25 时,我在软件安装程序中收到一条错误消息:

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

当我尝试使用其他解决方案时,例如 smartGui,它会抱怨我没有新版本的 hg。它需要版本 >3.3,而我的版本是 2.6.2。

有什么方法可以使这两个中的任何一个工作?或者 RHEL 是否让您使用其他具有遗留支持的东西?

hg --version
Mercurial Distributed SCM (version 2.6.2)

python -V
Python 2.7.5

我设法弄清楚如何在 RHEL 7 上进行这项工作。

首先,我们必须将 mercurial 更新到 3.6.1 版本,因为这是 smartGui 的要求。 (发布时需要版本 3.3 - 3.6)

安装和更新的完整步骤如下:

 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

此时,找到构建rpm文件并执行它。对我来说,它在 ~/hg/contrib/rpmbuild/RPMS/x86_64 目录中。

现在,当您启动 SmartGui 时,只需将 hg 指向

whereis hg

命令。很有可能,您的位置与我的位置相同,在 /usr/bin/hg