Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/mercurial/__pycache__/ |
Upload File : |
o �]Lbv � @ s� d dl mZ d dlZddlmZmZmZmZ z d dlZ e j W n ey, d dl Z Y nw dZdd� Z dd � Zd d� Zdd � ZdS )� )�absolute_importN� )�encoding�pycompat�util�win32s morec s* 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.inic sJ t j�| �r!tt�| ��D ]\}}|�d�r � �t j�| |�� q d S d S )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>._processdirs hgrc.ds PROGRAMDATAs Mercurials hgrcs SOFTWARE\MercurialN)r �executablepathr r r �dirnamer r �environ�get�isfiler � lookupreg�winreg�HKEY_LOCAL_MACHINE� isinstance�bytes� localpath�splitr � ospathsep�lowerr )�filename�progrcr �programdata�ini�value�pr r r �systemrcpath s4 � r- c C sh t d�} tj�| d�tj�| d�g}tj�d�}|r2|| kr2|�tj�|d�� |�tj�|d�� |S )z3return os-specific hgrc search path to the user dir� ~r s .hgrc� USERPROFILE)�_legacy_expanduserr r r r r r r )�homer �userprofiler r r � userrcpathE s r3 c C s� | � d�s| S dt| �}}||k r&| | dvr&|d7 }||k r&| | dvsdtjv r1tjd }n/dtjv r<tjd }n$dtjvrC| S ztjd }W n tyU d}Y nw tj�|tjd �}|dkrstj�tj�|�| d|� �}|| |d � S ) z2Expand ~ and ~user constructs in the pre 3.8 styler. r s \/s HOMEr/ s HOMEPATHs HOMEDRIVE� N) � startswith�lenr r �KeyErrorr r r r )r �i�n�userhome�driver r r r0 P s* � �r0 c C s t �� S )N)r �termsize)�uir r r r<