File: //usr/lib/python3/dist-packages/mercurial/__pycache__/rcutil.cpython-310.pyc
o
�]LbK � @ s� d dl mZ d dlZddlmZmZmZ ddlmZ ej r$ddlm
Z nddlmZ ej
Z
ejZejZdd � Zdd
d�Zdd
� Zdd� Zdd� Zdd� ZdS )� )�absolute_importN� )�encoding�pycompat�util)�resourceutil)�
scmwindows)�scmposixc sB t �| ��tj���rtjj� t� �fdd�t ���D ��S �gS )z@path could be a file or a directory. return a list of file pathsc 3 s( � | ]\}}|� d �r� �|�V qdS )� .rcN)�endswith)�.0�f�k��join�p� �2/usr/lib/python3/dist-packages/mercurial/rcutil.py� <genexpr># s � �
�z _expandrcpath.<locals>.<genexpr>)r �
expandpath�os�path�isdirr �sorted�listdir)r r r r �
_expandrcpath s
�r c C sR | du rt j} g d�}g }|D ]\}}}|| vrq|�||| | d| f� q|S )z�Return [(section, name, value, source)] config items.
The config items are extracted from environment variables specified by env,
used to override systemrc, but not userrc.
If env is not provided, encoding.environ will be used.
N))s EDITOR� ui� editor)s VISUALr r )s PAGER� pagerr s $%s)r �environ�append)�env� checklist�result�envname�section�
confignamer r r �
envrcitems) s r'