https://t.me/RX1948
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/mercurial/__pycache__/upgrade.cpython-310.pyc
o

�]Lb\:�@s�ddlmZddlmZddlmZmZmZmZ	m
Z
mZm
Z
ddlmZmZddlmZejZ							dd
d�Zdd
�Zdd�ZdS)�)�absolute_import�)�_)�error�hg�	localrepo�lock�pycompat�requirements�scmutil)�actions�engine)�
stringutilFNTc)CsP|durt�}|��}i}|dur||tj<|dur||tj<|dur(||tj<t�|�t�	|j
�}	t�|j
|	�}
|
�t�
|��t�||
�t�|�}g}|D]}
|
j|vrc|�|
�|�|
j�qQ|rxtjtd�d�t|��td�d��t�|�}t�||||j|
�}t�|�}t�}td�}td�}d}tj}tj}tj}|r�t|���r�|��D]\}}|r�|�|�q�nttj �}|��D]\}}|s�|�|�q�|�!��rt�}|�|�|�|�|�|�d	d
�|D�}|j"dd�d
�|�rtd�}td�}d�dd�|D��}||;}tj||d��t||dd�d
�D]�}|j#tj$k�r+�q |j%�rd||v�rd||v�rM||�sL|d|jf}|�&|�d}n|d|jf}|�'|�|j(�s_d}|�|�|j)�r�||v�r�||v�r�||�s�|d|jf}|�&|�d}n|d|jf}|�'|�|j(�s�d}|�|�|j*�r�||v�r�||v�r�||�s�|d|jf}|�&|�d}n|d|jf}|�'|�|j(�s�d}|�|��q |dk�r�|�&d�n
|dk�r�|�'d�t�+||
|j||||�} |�s�g}!g}"|D]}#|#�,|��r|!�|#��q|#j-�r|"�|#��q|!�s"|"�r^|!�r=|�'td��|!D]}$|�'d|$j|$j.f��q.|"�rX|�'td��|"D]}$|�'d|$j|$j.f��qI|�'d�n|�'td ��|�'td!��| �/�| �0�| �1�| �2�| j3�r�|�'td"��| �4�dS| j�s�| j5�s�|�'td#��dS|�6td$��| �/�| �0�| �1�| �2�|�'td%��|�7���|�8���|�'td&��t9j:d'|j;d(�}%d}&zx|�'td)�|%�|j
�<|j
�}'t=j>|'|%dd*�}(|(�7��%|(�8��t�?|||(| �}&Wd�n	1�s
wYWd�n	1�swYW|�'td+�|%�|j@jA|%dd,�|&�rK|j(�sK|�&td-�|&�|�&td.��| �B�n-|�'td+�|%�|j@jA|%dd,�|&�rx|j(�sx|�&td-�|&�|�&td.��| �B�wWd�n1�s�wYWd�dSWd�dS1�s�wYdS)/zUpgrade a repository in place.Ns)unknown optimization action requested: %ss, s0run without arguments to see valid optimizations��hints3warning: ignoring %14s, as upgrade is changing: %s
s3note:    selecting %s for processing to change: %s
rcSsg|]}|js|�qS�)�compatible_with_share��.0�arr�3/usr/lib/python3/dist-packages/mercurial/upgrade.py�
<listcomp>ts
��zupgraderepo.<locals>.<listcomp>cS�|jS�N��name�rrrr�<lambda>w�zupgraderepo.<locals>.<lambda>)�keys2cannot use these actions on a share repository: %ss$upgrade the main repository directlycss�|]}|jVqdSrrrrrr�	<genexpr>{s�zupgraderepo.<locals>.<genexpr>cSrrrrrrrrrs
--no-filelogs�sall-filelogsrs
--no-manifestsall-manifestlogss--no-changelogTs	changelog�
sBrepository lacks features recommended by current config options:

s
%s
   %s

s?repository lacks features used by the default config options:

s2(no format upgrades found in existing repository)
sEperforming an upgrade with "--run" will make the following changes:

sKadditional optimizations are available by specifying "--optimize <name>":

snothing to do
s-upgrade will perform the following actions:

sbeginning upgrade...
s repository locked and read-only
supgrade.)�prefix�dirs9creating temporary repository to stage upgraded data: %s
)�path�creates!removing temporary repository %s
)�forciblys'copy of old repository backed up at %s
sqthe old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
)C�set�
unfiltered�upgrade_engine�UPGRADE_CHANGELOG�UPGRADE_MANIFEST�UPGRADE_FILELOGS�upgrade_actions�check_source_requirementsr�defaultcreateopts�ui�newreporequirements�update�preservedrequirements�check_requirements_changes�findoptimizationsr�append�discardr�Abortr�join�sorted�find_format_upgrades�determine_upgrade_actionsr
�find_format_downgrades�any�values�items�add�UPGRADE_ALL_REVLOGS�shared�sort�type�FORMAT_VARIANT�touches_filelogs�warn�status�quiet�touches_manifests�touches_changelog�UpgradeOperation�
fromconfig�default�description�print_requirements�print_optimisations�print_upgrade_actions�print_affected_revlogs�unused_optimizations�print_unused_optimizations�removed_actions�write�wlockrr	�mkdtempr%�	__class__r�
repository�upgrade�vfs�rmtree�print_post_op_messages))r1�repo�run�optimize�backup�manifest�	changelog�filelogs�specified_revlogs�default_options�newreqs�alloptimizations�
optimizations�o�format_upgrades�
up_actionsrX�touched_revlogs�
overwrite_msg�
select_msg�
msg_issued�FL�MN�CL�rl�enabled�unsafe_actions�m�hr�action�msg�
upgrade_oprO�onlydefault�d�i�tmppath�
backuppath�repoui�dstreporrr�upgraderepo!s�






���
�

��

�



�


�




�




�

�


�

������������	����
���
�
���T�r�c
Cs`d}t�|d�}|��}||}	|	�tj�|�tj�|dkr"dSz�z>t�||ddd�}t�|d�}
|
|krS||
}||8}||
O}||}	|	�tj�|�tj�t�	||	�|�
td��Wn;tj
y�}z.td�}
|d	kr�tjtd
�t�|j�|
d��|r�|j
td�t�|j�|
d�WYd}~nd}~wwW|r�|��dSdS|r�|��ww)
z,Upgrades a share to use share-safe mechanismNF�allow�wlockrTs+repository upgraded to use share-safe mode
�?see `hg help config.format.use-share-safe` for more informations
upgrade-aborts&failed to upgrade share, got error: %srs'failed to upgrade share, got error: %s
)r�
_readrequires�copyrB�requirementsmod�SHARESAFE_REQUIREMENT�lockmod�trylockr�
writerequiresrIrr�	LockErrorr9r�forcebytestr�strerror�release)r1�hgvfs�storevfs�current_requirements�mismatch_config�
mismatch_warnrZ�store_requirements�original_crequirements�diffrequires�locked_requirements�removed�errrr�upgrade_share_to_safe,s\	�
��
������
�r�c

CsTd}t�|d�}|��}|tj8}||O}|�tj�|dkr!dSz�z9t�||ddd�}t�|d�}	|	|krM||	}
||
8}||	O}||O}|t	tj�8}t
�||�|�t
d��Wn;tjy�}z.t
d�}|dkr{tjt
d	�t�|j�|d
��|r�|jt
d�t�|j�|d
�WYd}~nd}~wwW|r�|��dSdS|r�|��ww)z5Downgrades a share which use share-safe to not use itNTr�r�rs1repository downgraded to not use share-safe mode
r�sdowngrade-aborts(failed to downgrade share, got error: %srs)failed to downgrade share, got error: %s
)rr�r�r��WORKING_DIR_REQUIREMENTS�remover�r�r�r(rr�rIrrr�r9rr�r�r�)
r1r��	sharedvfsr�r�r�rZ�source_requirementsr�r�r�r�rrrr�downgrade_share_to_non_safeisZ	
�
��
������
�r�)FNTNNN)�
__future__r�i18nr�rrrrr�r	r
r�r�
upgrade_utilsrr.r
r*�utilsr�allformatvariantr�r�r�rrrr�<module>s"$

�
=

https://t.me/RX1948 - 2025