The hg_pillar.py module needs to be found by salt the salt-master as an extension module. So if e.g. extension_modoules is set to :file:`/srv/salt_extensions` then it should be installed as :file:`/srv/salt_extensions/pillar/hg_pillar.py`.
The module depends on the hglib python module being available. This is the same requirement as for hgfs so should not pose any extra hurdles.
See http://docs.saltstack.com/en/latest/topics/development/external_pillars.html for more details on using external pillars.
To configure a Mercurial-backed external pillar the following configuration should be added to the master:
ext_pillar: - hg: ssh://firstname.lastname@example.org/user/repo
Some functions are not yet implemented as they where not yet required.
There are no tests as yet, which is disgraceful.