I've fallen in love with Mercurial. It's used by projects and people that I respect, and I'm using it more and more.
I wanted to make sure I was using the latest version, but I didn't want to uninstall gutsy's version 0.9.4 and install it from source, nor did I want to upgrade my entire system to hardy. I've played around with such bleeding-edge things in the past, and while I still like to bleed sometimes, the Linux desktop is not one of those areas in which I desire to. :)
So, what to do?
Fortunately, it's easy to backport it from hardy. Here's what I did:
$ vim /etc/apt/sources.list
Add this line to the end:
deb-src http://us.archive.ubuntu.com/ubuntu/ \ hardy main restricted universe multiverseSave and exit.
$ sudo apt-get update
$ sudo apt-get build-dep mercurial
$ fakeroot apt-get source -b mercurial
$ sudo dpkg -i mercurial_0.9.5-2_i386.deb
Lather, rinse, then repeat steps 4 through 7 as necessary if you're anxious. Or, just wait three months for hardy. :)
{ 6 comments }
Thanks for this tip. In trying it, I notice Step 5 needs to be “sudo apt-get build-dep mercurial”.
Any chance we could see this published in a Personal Package Archive (PPA) for those of use who don’t have the whole dev toolchain installed?
@Mike: Thanks, I’ve corrected that mistake.
@Jamie: I just switched to Mac OS X again as my primary workstation, and 8.04 will hopefully be released on time, so I don’t think I will be the one to create a PPA. If someone else does though, I’ll gladly link to it at the top of this post. :)
Thanks, this was a life-saver! 0.9.4 is not supported in my group, and I really had no idea how to upgrade. I would *not* have been able to figure out these steps for the life of me – I actually still don’t know what I just did, but it worked! :)
@David: I’m glad it worked out well for you! It did take me a few years to remember all the pieces involved in doing something like that, and it’s still magical for me. I applaud Debian for building such a great set of tools.
What you just did was take a source package for something that’s in hardy but not gutsy, installed all of its build dependencies (which *are* in gutsy), built the source package into a .deb file, then installed the resulting .deb file. :)
Tiny (non-crucial) suggestion – it might be slightly more manageable to create the new file /etc/apt/sources.list.d/hardysources.list (or so) and put the deb line there instead of editing main sources.list (which is better left for GUI tools). The rest works in the same way
Comments on this entry are closed.