HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/mercurial/__pycache__/scmwindows.cpython-310.pyc
o

�]Lbv
�@s�ddlmZddlZddlmZmZmZmZz	ddlZ	e	j
Wn
ey,ddl	Z	YnwdZdd�Z
dd	�Zd
d�Zdd
�ZdS)�)�absolute_importN�)�encoding�pycompat�util�win32smorecs*g�t��}tj�tj�|�d�}��|��fdd�}|tj�tj�|�d��tj�	d�}|retj�|d�}|tj�|d��tj�|d�}tj�
|�rS��|�tj�|d�}tj�
|�re��|�t�dd	t
j�}|r�t|t�r�t�|�}|�tj�D]}|���d�r���|�q||�q�S)
z+return default os-specific hgrc search path�
mercurial.inicsJtj�|�r!tt�|��D]\}}|�d�r ��tj�||��q
dSdS)Ns.rc)	�os�path�isdir�sortedr�listdir�endswith�append�join)�progrcd�f�kind��rcpath��6/usr/lib/python3/dist-packages/mercurial/scmwindows.py�_processdir s
��z!systemrcpath.<locals>._processdirshgrc.dsPROGRAMDATAs	MercurialshgrcsSOFTWARE\MercurialN)r�executablepathr	r
r�dirnamerr�environ�get�isfiler�	lookupreg�winreg�HKEY_LOCAL_MACHINE�
isinstance�bytes�	localpath�splitr�	ospathsep�lowerr)�filename�progrcr�programdata�ini�value�prrr�systemrcpaths4


�

r-cCshtd�}tj�|d�tj�|d�g}tj�d�}|r2||kr2|�tj�|d��|�tj�|d��|S)z3return os-specific hgrc search path to the user dir�~rs.hgrc�USERPROFILE)�_legacy_expanduserr	r
rrrrr)�homer
�userprofilerrr�
userrcpathEsr3cCs�|�d�s|Sdt|�}}||kr&||dvr&|d7}||kr&||dvsdtjvr1tjd}n/dtjvr<tjd}n$dtjvrC|Sztjd}WntyUd}Ynwtj�|tjd�}|dkrstj�tj�|�|d|��}|||d	�S)
z2Expand ~ and ~user constructs in the pre 3.8 styler.rs\/sHOMEr/sHOMEPATHs	HOMEDRIVE�N)	�
startswith�lenrr�KeyErrorr	r
rr)r
�i�n�userhome�driverrrr0Ps*
�


�r0cCst��S)N)r�termsize)�uirrrr<psr<)�
__future__rr	�rrrr�_winregr�CloseKey�ImportError�
fallbackpagerr-r3r0r<rrrr�<module>s
�-