Install TortoiseHG with mercurial 3.3.2

5,103

Solution 1

After a few more in-depth investigations, I have found that the first version of my answer was wrong.

None of the “TortoiseHg PPA Packagers” team PPAs work with the Mercurial PPAs of the same team, at least not for Precise.

The TortoiseHg PPA Packagers: Snapshots PPA needs mercurial (>= 2.7~) and mercurial (<< 2.9~) and the TortoiseHg PPA Packagers: Stable Snapshots PPA needs mercurial (>= 3.0~) and mercurial (<< 3.2~).

Solution 2

Since tortoisehg-ppa is empty now, I ended up building the .deb packages from xenial. But tortoisehg from xenial is 3.7.3 and requires mercurial < 3.8, so you can't use mercurial-ppa which has 3.8.3. So build mercurial from xenial as well.

First install tools for building and update source repos:

sudo apt-get install dpkg-dev build-essential fakeroot

edit /etc/apt/sources.list and replace
  deb-src ... trusty universe
with
  deb-src ... xenial universe

sudo apt-get update

Build mercurial:

mkdir build-mercurial
cd build-mercurial
sudo apt-get build-dep mercurial
apt-get source mercurial
cd mercurial-3.7.3/
DEB_BUILD_OPTIONS=nocheck fakeroot debian/rules binary
sudo dpkg -i ../mercurial_*.deb

Build tortoisehg:

cd ../..
mkdir build-tortoisehg
cd build-tortoisehg
sudo apt-get build-dep tortoisehg
apt-get source tortoisehg
cd tortoisehg-3.7.3/
fakeroot debian/rules binary
sudo dpkg -i ../tortoisehg_*.deb

Note that dpkg may complain about uninstalled dependencies. Install them using apt-get install as needed and re-run dpkg -i ... .

Share:
5,103

Related videos on Youtube

18446744073709551615
Author by

18446744073709551615

Updated on September 18, 2022

Comments

  • 18446744073709551615
    18446744073709551615 almost 2 years

    I want a GUI to view, compare and checkout versions of my project(s). But when I want to install Tortoise HG, apt proposes to downgrade Mercurial. I remember that upgrading to 3.3 has solved some problem (I do not remember what it was), and I have a number of repositories created with 3.3, so I do not want to downgrade.

    hg view sort of works, but it does not allow me to checkout a revision or compare two revisions with meld.

    $ hg --version
    Mercurial Distributed SCM (version 3.3.2)
    ...
    $ sudo aptitude install tortoisehg
    ....
    The following packages have unmet dependencies:
     tortoisehg : Depends: mercurial (< 3.2~) but 3.3.2-1ppa2~precise1 is installed.
    The following actions will resolve these dependencies:
    
         Keep the following packages at their current version:
    1)     tortoisehg [Not Installed]                         
    
    Accept this solution? [Y/n/q/?] 
    
    ...
    
         Downgrade the following packages:                                                   
    3)     mercurial [3.3.2-1ppa2~precise1 (now, precise) -> 2.0.2-1ubuntu1 (precise)]
    

    So:

    1. How do I install Tortoise-hg for Mercurial 3.3?

    2. What alternatives can I use instead?

    EDIT:

    $ lsb_release -a; uname -a; apt-cache policy tortoisehg mercurial
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 12.04.5 LTS
    Release:    12.04
    Codename:   precise
    Linux somename 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:04:35 UTC 2014 i686 i686 i386 GNU/Linux
    tortoisehg:
      Installed: (none)
      Candidate: 3.0-0ppa1~precise1
      Version table:
         3.0-0ppa1~precise1 0
        500 http://ppa.launchpad.net/tortoisehg-ppa/releases/ubuntu/ precise/main i386 Packages
         2.2-1 0
        500 http://XX.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
        100 /var/lib/dpkg/status
    mercurial:
      Installed: 3.3.2-1ppa2~precise1
      Candidate: 3.3.2-1ppa2~precise1
      Version table:
     *** 3.3.2-1ppa2~precise1 0
        500 http://ppa.launchpad.net/mercurial-ppa/releases/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status
         3.0.1-0ppa1~precise1 0
        500 http://ppa.launchpad.net/tortoisehg-ppa/releases/ubuntu/ precise/main i386 Packages
         2.0.2-1ubuntu1.2 0
        500 http://XX.archive.ubuntu.com/ubuntu/ precise-updates/universe i386 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/universe i386 Packages
         2.0.2-1ubuntu1 0
        500 http://XX.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
    

    EDIT2:

    $ apt-cache policy tortoisehg
    tortoisehg:
      Installed: (none)
      Candidate: 3.3.3+2-426769dbcfe8-0ppa1~precise1
      Version table:
         3.3.3+2-426769dbcfe8-0ppa1~precise1 0
        500 http://ppa.launchpad.net/tortoisehg-ppa/stable-snapshots/ubuntu/ precise/main i386 Packages
         2.2-1 0
        500 http://XX.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
        100 /var/lib/dpkg/status
    
    • A.B.
      A.B. over 8 years
      Edit your question and add the output of lsb_release -a; uname -a; apt-cache policy tortoisehg mercurial
    • A.B.
      A.B. over 8 years
      You could force the installation, but I do not know if the idea is so good.
    • 18446744073709551615
      18446744073709551615 over 8 years
      Can I borrow a .deb from another distribution, say, Trusty?
    • A.B.
      A.B. over 8 years
      I'm not sure. You can try it. It will not break your system.
    • 18446744073709551615
      18446744073709551615 over 8 years
      Well, after sudo apt-get download tortoisehg (download to the current directory) and sudo dpkg -i tortoisehg_3.3.3+2-426769dbcfe8-0ppa1~precise1_all.deb it works... Just not sure for how long it will work, I remember a package installed like this broke with the updates.
    • 18446744073709551615
      18446744073709551615 over 8 years
      Please undelete the answer, I used your PPAs!
  • 18446744073709551615
    18446744073709551615 over 8 years
    I'm still getting an error, probably, the old ppa is still in the list: The following packages have unmet dependencies: tortoisehg : Depends: mercurial (< 3.2~) but 3.3.2-1ppa2~precise1 is to be installed Recommends: libjs-underscore but it is not going to be installed E: Unable to correct problems, you have held broken packages.
  • A.B.
    A.B. over 8 years
    I need the output of apt-cache policy tortoisehg again
  • A.B.
    A.B. over 8 years
    and apt-cache showpkg tortoisehg