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__/bundlecaches.cpython-310.pyc
o

�]Lbk6�@s�ddlmZddlmZddlmZmZmZm	Z	ddl
mZe	jZdZ
ejGdd�de��Zdd	d
d	d�Zddd
d
d
d
d�dd	d
d
ddd�dd
id�Zeded<dd
dd
d
d�iZhd�Zd#dd�Zdd�Zdd�Zd$dd�ZGdd�de�Zd d!�Zd"S)%�)�_)�attr)�error�requirements�sslutil�util)�
stringutilsclonebundles.manifestc@s<eZdZe��Ze��Ze��Ze��Ze��Z	e��Z
dS)�
bundlespecN)�__name__�
__module__�__qualname__r�ib�compression�wirecompression�version�wireversion�params�contentopts�rr�8/usr/lib/python3/dist-packages/mercurial/bundlecaches.pyr	sr	s01�02�s1)�v1�v2�packed1�bundle2TF)�changegroup�
cg.versionsobsolescencesphases�tagsfnodescache�revbranchcacher)rrrrr�streamv2)rr rr>�gzip�none�bzip2cCs�dd�}|rd|vrt�td�|��d|vrB|�dd�\}}|tjjvr.t�td�|��||�\}}|tvrAt�td�|��nE|rFJ�||�\}}|tjjvrn|}d}t	j
|jvr_d	}nt	j|jvrgd	}|t
vrmd	}n|tvr~|d
kryd}nd}|}n	t�td
�|��|dkr�|t
vr�t�td�|��|d
kr�d|vr�t|d�d��}|t	j}|r�t�td�d�t|����t�|i���}	d|vr�|dd	kr�td}
|	�|
�tj�|�}|��\}}t|}
t||||
||	�S)a�Parse a bundle string specification into parts.

    Bundle specifications denote a well-defined bundle/exchange format.
    The content of a given specification should not change over time in
    order to ensure that bundles produced by a newer version of Mercurial are
    readable from an older version.

    The string currently has the form:

       <compression>-<type>[;<parameter0>[;<parameter1>]]

    Where <compression> is one of the supported compression formats
    and <type> is (currently) a version string. A ";" can follow the type and
    all text afterwards is interpreted as URI encoded, ";" delimited key=value
    pairs.

    If ``strict`` is True (the default) <compression> is required. Otherwise,
    it is optional.

    Returns a bundlespec object of (compression, version, parameters).
    Compression will be ``None`` if not in strict mode and a compression isn't
    defined.

    An ``InvalidBundleSpecification`` is raised when the specification is
    not syntactically well formed.

    An ``UnsupportedBundleSpecification`` is raised when the compression or
    bundle type/version is not recognized.

    Note: this function will likely eventually return a more complex data
    structure, including bundle2 part information.
    cSs�d|vr|ifSi}|�dd�\}}|�d�D]%}d|vr&t�td�|��|�dd�\}}t�|�}t�|�}|||<q||fS)N�;r�=s:invalid bundle specification: missing "=" in parameter: %s)�splitr�InvalidBundleSpecificationr�urlreq�unquote)�srr�paramstr�p�key�valuerrr�parseparamsns$���


z$parsebundlespec.<locals>.parseparams�-sCinvalid bundle specification; must be prefixed with compression: %srs%s compression is not supporteds%%s is not a recognized bundle versionrrrr"r#s+%s is not a recognized bundle specifications4compression engine %s is not supported on v1 bundlessrequirements�,s+missing support for repository features: %ss, sstreamr )rr'rr&r�compengines�supportedbundlenames�UnsupportedBundleSpecification�_bundlespeccgversions�requirementsmod�GENERALDELTA_REQUIREMENTr�REVLOGV2_REQUIREMENT�_bundlespecv1compengines�set�STREAM_FIXED_REQUIREMENTS�join�sorted�_bundlespeccontentopts�get�copy�_bundlespecvariants�update�
forbundlename�
bundletyper	)�repo�spec�strictr/rrrr�missingreqsr�variant�enginerrrrr�parsebundlespecLs�"���
�
���
���
��
�rKc

Cs�g}|��D]^}|��}|sqd|di}|dd�D]C}|�dd�\}}tj�|�}tj�|�}|||<|dkr^zt||�}	|	j|d<|	j|d<Wqtj	yTYqtj
y]Yqwq|�|�q|S)	z�Parses the raw text of a clone bundles manifest.

    Returns a list of dicts. The dicts have a ``URL`` key corresponding
    to the URL and other keys are the attributes for the entry.
    �URL�rNr%�
BUNDLESPECsCOMPRESSIONsVERSION)�
splitlinesr&rr(r)rKrrrr'r4�append)
rEr*�m�line�fields�attrs�rawattrr-r.r	rrr�parseclonebundlesmanifest�s0

��
rVcCs@|jdkr|jdkrdS|jdkr|jdkr|j�d�rdSdS)NsUNrTrr F)rrrr?)r	rrr�isstreamclonespecs


�rWc
Cs�g}|D]�}|�d�}|rhzt||dd�}|r't|�s'|j�d|d�WqWnLtjyF}z|j�t�|�d�WYd}~qd}~wtj	yg}z|j�d|dt�|�f�WYd}~qd}~ww|ru|j�d	|d�qd
|vr�t
js�|j�d|d�qd|vr�z	t�
|d�}Wntjy�|j�d
|d�Yqw|j��}	|	dur�|	d|kr�|j�d|d�q|�|�q|S)auRemove incompatible clone bundle manifest entries.

    Accepts a list of entries parsed with ``parseclonebundlesmanifest``
    and returns a new list consisting of only the entries that this client
    should be able to apply.

    There is no guarantee we'll be able to apply all returned entries because
    the metadata we use to filter on may be missing or wrong.
    rNT)rGs(filtering %s because not a stream clone
rL�
Ns1filtering %s because unsupported bundle spec: %s
s?filtering %s because cannot determine if a stream clone bundle
s
REQUIRESNIs'filtering %s because SNI not supported
sREQUIREDRAMs0filtering %s due to a bad REQUIREDRAM attribute
g��Q��?s8filtering %s as it needs more than 2/3 of system memory
)r?rKrW�ui�debugrr'r�forcebytestrr4r�hassnir�	sizetoint�
ParseError�estimatememoryrP)
rE�entries�streamclonerequested�
newentries�entryrFr	�e�requiredram�	actualramrrr�filterclonebundleentriessx

����������
����
��rgc@sPeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�clonebundleentryz�Represents an item in a clone bundles manifest.

    This rich class is needed to support sorting since sorted() in Python 3
    doesn't support ``cmp`` and our comparison is complex enough that ``key=``
    won't work.
    cCs||_||_dS�N)r.�prefers)�selfr.rjrrr�__init__bs
zclonebundleentry.__init__cCs�|jD]J\}}|j�|�}|j�|�}|dur"|dur"||kr"dS|dur1|dur1||kr1dS|dus9|dur:q||kr?q||krFdS||krMdSqdS)N���rrM)rjr.r?)rk�other�prefkey�	prefvalue�avalue�bvaluerrr�_cmpfs"zclonebundleentry._cmpcCs|�|�dkS�NrM�rs�rkrnrrr�__lt__��zclonebundleentry.__lt__cCs|�|�dkSrtrurvrrr�__gt__�rxzclonebundleentry.__gt__cCs|�|�dkSrtrurvrrr�__eq__�rxzclonebundleentry.__eq__cCs|�|�dkSrtrurvrrr�__le__�rxzclonebundleentry.__le__cCs|�|�dkSrtrurvrrr�__ge__�rxzclonebundleentry.__ge__cCs|�|�dkSrtrurvrrr�__ne__�rxzclonebundleentry.__ne__N)r
rr�__doc__rlrsrwryrzr{r|r}rrrrrhZs"rhcsV|�dd���st|�Sdd���fdd��D��t�fdd�|D��}d	d�|D�S)
NsuisclonebundlepreferscSs2d|vrtd�}tjtd�||d��|�dd�S)Nr%s3each comma separated item should be key=value pairss&invalid ui.clonebundleprefers item: %s)�hintr)rr�Abortr&)r,rrrr�_split�s�z&sortclonebundleentries.<locals>._splitcsg|]}�|��qSrr)�.0r,)r�rr�
<listcomp>�sz*sortclonebundleentries.<locals>.<listcomp>c3s�|]}t|��VqdSri)rh)r��v)rjrr�	<genexpr>�s�z)sortclonebundleentries.<locals>.<genexpr>cSsg|]}|j�qSr)r.)r��irrrr��s)�
configlist�listr=)rYr`�itemsr)r�rjr�sortclonebundleentries�sr�N)T)F)�i18nr�
thirdpartyr�rrr6rr�utilsrr(�CB_MANIFEST_FILEr*�objectr	r5r>rAr9rKrVrWrgrhr�rrrr�<module>sZ�
�	����

$
HA

https://t.me/RX1948 - 2025