ubuntu安装最新的mercurial

Mercurial 是一种轻量级分布式版本控制系统,采用 Python 语言实现,易于学习和使用,扩展性强

之前安装的mercurial版本(2.8.2)太老了,想安装最新版本的。

网上搜到方法

sudo add-apt-repository ppa:tortoisehg-ppa/releases
sudo add-apt-repository ppa:mercurial-ppa/releases
sudo apt-get update
sudo apt-get install mercurial python-nautilus tortoisehg

但是提示更新失败

W: Failed to fetch http://ppa.launchpad.net/mercurial-ppa/releases/ubuntu/dists/trusty/main/binary-amd64/Packages  Hash Sum mismatch
W: Failed to fetch http://ppa.launchpad.net/tortoisehg-ppa/releases/ubuntu/dists/trusty/main/binary-amd64/Packages  Hash Sum mismatch

关于Hash Sum mismatch,就不在这里讨论了。

后来发现: pypi上有对应的安装包

https://pypi.python.org/pypi/Mercurial

只要

sudo pip install mercurial -U #如果之前已安装
sudo pip install mercurial    #如果之前未安装

效果:

[hupeng@hupeng-vm ~]$hg --version
Mercurial Distributed SCM (version 4.1.3)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2017 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
原文地址:https://www.cnblogs.com/hupeng1234/p/6763262.html