File: //proc/self/root/lib64/python2.7/site-packages/mercurial/rcutil.pyc
�
1�3\c @@ s� d d l m Z d d l Z d d l m Z m Z m Z e j rT d d l m Z n d d l m
Z e j Z e j Z e j
Z
d � Z d d � Z d � Z d
� Z d � Z d S( i ( t absolute_importNi ( t encodingt pycompatt util( t
scmwindows( t scmposixc C@ sr t j | � } t j j | � rk t j j } g t j | � D]* \ } } | j d � r= | | | � ^ q= S| g S( s@ path could be a file or a directory. return a list of file pathss .rc( R t
expandpatht ost patht isdirt joint listdirt endswith( R t pR
t ft k( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt
_expandrcpath s
>c C@ s~ | d k r t j } n d d
d g } g } xJ | D]B \ } } } | | k rU q4 n | j | | | | d | f � q4 W| S( s� 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.
t EDITORt uit editort VISUALt PAGERt pagers $%sN( R R R ( R R R ( R R R ( t NoneR t environt append( t envt checklistt resultt envnamet sectiont
configname( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt
envrcitems# s %c C@ sC g } t j j t j d � } t j j | � r? t | � } n | S( s return rc paths in default.ds default.d( R R R
R t datapathR R ( R t defaultpath( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt
defaultrcpath9 s
c C@ s� d t � f } d t j k rw | g } x� t j d j t j � D]/ } | sS qA n | j d � t | � D� � qA WnB d � } | t � t � � } | j
| � | j | t � � � | S( s� return an ordered [(type, obj)] about where to load configs.
respect $HGRCPATH. if $HGRCPATH is empty, only .hg/hgrc of current repo is
used. if $HGRCPATH is not set, the platform default will be used.
if a directory is provided, *.rc files under it will be used.
type could be either 'path' or 'items', if type is 'path', obj is a string,
and is the config file path. if type is 'items', obj is a list of (section,
name, value, source) that should fill the config directly.
t itemst HGRCPATHc s@ s | ] } d | f Vq d S( R N( ( t .0R
( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pys <genexpr>V s c S@ s) g | D] } d t j j | � f ^ q S( NR ( R R t normpath( t pathsR
( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt <lambda>X t ( R R R t splitR t ospathsept extendR R# t systemrcpathR t
userrcpath( t envrct
_rccomponentsR
t normpaths( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt rccomponentsA s $
c C@ s i d d 6d d 6S( su return a dict of default environment variables and their values,
intended to be set before starting a pager.
t FRXt LESSs -ct LV( ( ( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt defaultpagerenv^ s ( t
__future__R R R* R R R t iswindowsR t scmplatformR t
fallbackpagerR. R/ R R R R# R3 R7 ( ( ( s6 /usr/lib64/python2.7/site-packages/mercurial/rcutil.pyt <module> s