Mercurial -- where are templates/static ???

I intend to server Mercurial through Nginx, so I installed both packages on my OpenSUSE 13.2 x86_64 box.

The instructions at http://mercurial.selenic.com/wiki/PublishRepositoriesOnNginx have the following path in the Nginx config:


location /hg/static {
    alias /usr/share/mercurial/templates/static/;
    expires 30d;
}

Well, the OpenSUSE Mercurial package (latest version from the standard OpenSUSE repositories: 3.1.2-4.1) didn’t install any such, in either this location or anywhere else I look (from what I see elsewhere, these are various static content things including CSS files).
How do I fix this?

Well, looking through the source of the package at https://build.opensuse.org/package/show/openSUSE:Factory/mercurial it looks like the corresponding files are in

/usr/lib64/python2.7/site-packages/mercurial/templates/static/

.
This means that when the Python version eventually changes, things will stop working as there’s just about 0% chance of a reasonable person remembering to update the Nginx config. This doesn’t seem like a good location.

Well, yes.
This is why for some languages a version manager is highly recommended. AFAIK, for python this is generally pyenv or virtualenv (there are many other choices which reflects on the importance of this issue).

You can also create an isolated environment where you can manage packages differently than your overall machine, this approach might be implemented using Docker

In any case, in the world of openSUSE you will likely want to modify your default system settings, ie if you have KDE installed, you will want to disable apper. If you’re running openSUSE without a Desktop or with LXDE or XFCE, no automatic updating is configured.

You will then probably want to either never or only very carefully run “zypper update” blacklisting any python version upgrades or simply run “zypper patch”

If this is a critical LOB type deployment, you’ll probably also want to implement a “next to zero time restore” solution… ie a “hot backup” which can be deployed immediately or a snapshotting solution that enables an immediate rollback.

TSU