File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/pillar/__pycache__/hg_pillar.cpython-310.pyc
o
�N�g� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlm Z zddl
Z
W n ey1 dZ
Y nw e�e
�ZdZdd� Zdd� Zdd
d�Zdd
� ZG dd� d�ZdS )a�
Use remote Mercurial repository as a Pillar source.
.. versionadded:: 2015.8.0
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.
This external Pillar source can be configured in the master config file as such:
.. code-block:: yaml
ext_pillar:
- hg: ssh://hg@example.co/user/repo
� N)�DEFAULT_HASH_TYPE�hgc C sB dd� t �dg �D �} tdd� | D ��sdS tst�d� dS tS )z*
Only load if hglib is available.
c S s g | ]}|�qS � r ��.0�xr r �I/opt/saltstack/salt/lib/python3.10/site-packages/salt/pillar/hg_pillar.py�
<listcomp>* s z__virtual__.<locals>.<listcomp>�
ext_pillarc S s g | ]}d |v �qS )r r r r r r r + s Fzhglib not present)�__opts__�get�any�hglib�log�error�__virtualname__)Zext_pillar_sourcesr r r �__virtual__&