403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/config.cpython-39.opt-1.pyc
a

�+�bX"�@s`ddlmZddlZddlZddlmZddlmZddlm	Z	m
Z
mZmZGdd�de�Z
dS)	�)�absolute_importN�)�_)�getattr)�encoding�error�pycompat�utilc@s�eZdZd+dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zd,dd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd-d!d"�Zd#d$�Zd%d&�Zd.d'd(�Zd/d)d*�ZdS)0�configNcCsDd|_i|_g|_|r@|jD]}||��|j|<q|jd|_dS)Nrr)�_current_source_level�_data�_unset�copy)�self�data�k�r�6/usr/lib64/python3.9/site-packages/mercurial/config.py�__init__s
zconfig.__init__cCs|jd7_dS)zYincrement the source counter

        This is used to define source priority when readingrN)r�rrrr�
new_source!szconfig.new_sourcecCst|�S�N)r
rrrrr'szconfig.copycCs
||jvSr)r�r�sectionrrr�__contains__*szconfig.__contains__cCs||j�|i�vSr�r�get�rr�itemrrr�hasitem-szconfig.hasitemcCs|j�|i�Srrrrrr�__getitem__0szconfig.__getitem__ccs|��D]
}|VqdSr)�sections)r�drrr�__iter__3szconfig.__iter__cCs�|j}|d7}|j}|jD]@\}}|j�|d�}|dur||vr|��|j|<|j||=q|D]|}|j�|d�}|r�|��|j|<nt��|j|<|j|��D]8\}}|\}	}
}||7}t||�}|	|
|f|j||<q�q`||_dS)Nr)	rr
rr�preparewriter	�cowsortdict�items�max)r�srcZ
current_levelZ	max_level�s�nZdsr�v�value�source�levelrrr�update7s&

z
config.updatecCs|j�|i��|�Srrrrrr�_getMszconfig._getcCs |�||�}|dur|S|dS)Nr�r0)rrr�default�resultrrrrPsz
config.getcCs>z|j||}Wnty,||fYS0||f|SdS)z�return a tuple allowing restore to reinstall a previous value

        The main reason we need it is because it handles the "no data" case.
        N)r�KeyError)rr�keyrrrr�backupVs
z
config.backupcCs |�||�}|durdS|dS)N�rr1�rrrr3rrrr-bsz
config.sourcecCs |�||�}|durdS|dS)N�r1r8rrrr.hszconfig.levelcCst|j���Sr)�sortedr�keysrrrrr!nszconfig.sectionscCs"t�|j�|i��}dd�|D�S)NcSsg|]\}}||df�qS)rr)�.0rr+rrr�
<listcomp>sr7z config.items.<locals>.<listcomp>)rZ	iteritemsrr)rrr&rrrr&qszconfig.itemsr7cCsLtjr||vrt��|j|<n|j|��|j|<|||jf|j||<dSr)rZispy3r	r%rr$r)rrrr,r-rrr�setus

z
config.setcCs:|j||}t|�}|f|dd�}||j||<dS)zsalter a value without altering its source or level

        This method is meant to be used by `ui.fixconfig` only.rN)r�len)rrr5Z	new_valuer�sizeZnew_itemrrr�alter�szconfig.altercCstt|�dkrL|dd�\}}|dd�}|j|��|j|<||j||<n$|\}}||jvrp|j|�|d�dS)z$restore data returned by self.backupr9N)r?rr$�pop)rrrr5rrrr�restore�s
zconfig.restorecCs�tj�d�}tj�d�}tj�d�}tj�d�}	tj�d�}
tj�d�}tj�d�}d}
d}d	}d
}|rt|�|
|
�}
|�d�D�]p}|d7}|dkr�|�d
�r�|dd�}|�r|
�|�r�q~|�|�}|�r|r�|
|vr�q~|�|
|�d|�d�}|�|
||d||f�q~d}d
}|�|�}|�r�|�r�t�	|�d��}z||||d�Wq~t
�y�}zB|jtjk�r�t
�td�|t�|j�fd||f��WYd}~q~d}~00q~|	�|��r�q~|�|�}|�r|�d�}
|�r�|�|
|
�}
|
|vr~t��|j|
<q~|�|�}|�rP|�d�}d}|�r0|
|v�r0q~|�|
||�d�d||f�q~|�|�}|�r�|�d�}|�r||
|v�r|q~|�|
|�du�r�|j|
��|j|
<|j|
|=|j�|
|f�q~|��}|�d��r�d|}t
�|d||f��q~dS)Ns\[([^\[]+)\]s([^=\s][^=]*?)\s*=\s*(.*\S|)s\s+(\S|\S.*\S)\s*$s
(;|#|\s*$)s(;|#)s%unset\s+(\S+)s%include\s+(\S|\S.*\S)\s*$r7rFTrs��
s%s:%d��remapr!scannot include %s (%s)r9� s!unexpected leading whitespace: %s)r	�re�compiler�
splitlines�
startswith�match�groupr>Z
expandpath�IOError�errno�ENOENTrZConfigErrorrrZ
strtolocal�strerrorr%rr$r
�append�rstrip)rr(rr!rG�includeZ	sectionreZitemreZcontreZemptyreZ	commentreZunsetreZ	includererr�lineZcont�l�mr+Zexpanded�inst�name�messagerrr�parse�s�


�
�





zconfig.parsecsN���|st�|d�}tj�|����fdd�}�j||��|||d�dS)Nsrbcs2tj�tj��|��}�j|||d����dS)NrF)�os�path�normpath�join�readr)�relrGr!�abs��dirrrrrU�szconfig.read.<locals>.include)r!rGrU)rr	Z	posixfiler]r^�dirnamer\ra)rr^�fpr!rGrUrrdrra�s�zconfig.read)N)N)r7)NNN)NNN)�__name__�
__module__�__qualname__rrrrrr r#r/r0rr6r-r.r!r&r>rArCr\rarrrrr
s(
	



Qr
)Z
__future__rrPr]Zi18nrrr�rrr	�objectr
rrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit