Upgrading Mercurial on shared hosting
Disclaimer: This is yet another "note to self" post. If you're not me, feel free to ignore it.
After God alone knows how many years (at least six, since I have posts related to it from 2010), it's finally time up upgrade the version of Mercurial that I have installed on my shared web hosting account. This is a shared hosting account with no shell access - nothing but web-based tools and FTP. I also don't know what OS it's running - just that it's some form of Linux. So I've been putting this off for obvious reasons.
Unfortunately for me, the defaults for repository creation in Mercurial 3.7 turn on general delta support by default. That isn't supported by the old version I was running (1.7), so my choices are to either use the now non-standard, older, and less efficient format my repositories, or just bite the bullet and upgrade. So I did the latter, since the version I had was pretty ancient and I was going to have to do it eventually anyway.
Fortunately, my hosting provider supports Python 2.7, which gets you most of Mercurial. However, there are some C-based components to Mercurial. Since I have no shell access to the hosting server, and there are probably no development tools installed even if I did, I had to try compiling on a VM. I was able to do that by spinning up a Fedora 24 VM (on the assumption that they're running RHEL, or something close enough to it), and doing a local build. The only caveat was that apparently my provider is running a 32-bit OS, because building on a 64-bit VM resulted in errors about the ELF format being incorrect.
Once the Fedora VM was up and running, I was able to do a build by running the following:
sudo dnf install python-devel
sudo dnf install redhat-rpm-config
That's about it. After I had a working build I was able to copy the Mercurial 3.8 folder to the server, right over top of the old version, and it just worked. Upgrade accomplished!
You can reply to this entry by leaving a comment below. You can send TrackBack pings to this URL. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.