ROOTPLOIT
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67150586 (67150586)
PHP: 8.3.36
Disabled: NONE
Upload Files
File: //kunden/kunden/kunden/lib/python3/dist-packages/mercurial/__pycache__/bundlecaches.cpython-313.pyc
�

6�hVN��0�%SSKJr SSKrSSKrSSKrSSKJrJrJr SSKJ	r	 SSK
Jr \R(aSSKrSSK
JrJrJrJrJr SSKJr \R.rS	rS
rS.SjrS/SjrS
SS\/r\R:"SS55rSSSSSS.rSSSSSSS.SSSSSSS.SSSSSSS.SSSSSSSS.SSSSSSSS.SS0SS0S.r S\!S '\ S\ S!'1S"kr"S#r#\#\#\#\#\#\#S$.r$S%r%S0S&jr&S'r'S(r(\RR"S)5r*S1S*jr+"S+S,5r,S-r-g)2�)�annotationsN)�Dict�Union�cast�)�_)�attr)�error�requirements�sslutil�url�util)�
stringutilsclonebundles.manifestspeer-bundle-cache://c�Z�URR[5nUR5Vs/sHo"R	SS5PM nn/nUH@n[XS5n[
U5S:XaUS-nO	SXRS4-nURU5 MB SRU5$s snf)z>get the bundle manifest to be served to a client from a server� rr�
s%s %s
�)	�vfs�tryread�CB_MANIFEST_FILE�
splitlines�split�alter_bundle_url�len�append�join)�repo�raw_text�e�entries�	new_linesr
�lines       �8/usr/lib/python3/dist-packages/mercurial/bundlecaches.py�get_manifestr$*s����x�x��� 0�1�H�)1�)<�)<�)>�?�)>�A�w�w�t�Q��)>�G�?��I�
���t�q�T�*���q�6�Q�;���;�D����d��+�D������
��8�8�I����@s�B(c��U$)z�a function that exist to help extension and hosting to alter the url

This will typically be used to inject authentication information in the url
of cached bundles.�)rr
s  r#rr:s	��
�Jrshttp://shttps://slargefile://c��\rSrSr\R
"5r\R
"5r\R
"5r\R
"5r	\R
"5r
\R
"5r\S5r
\S5rSSjrSrSrg)	�
bundlespec�Jc�X�[R"URUR5$�N)�collections�ChainMap�_explicit_params�
_default_opts��selfs r#�params�bundlespec.paramsWs!���#�#�D�$9�$9�4�;M�;M�N�Nrc��UR$r+)r2r0s r#�contentopts�bundlespec.contentopts[s���{�{�rc�N�U(dXR;aX RU'gg)zGSet a bundle parameter value.

Will only overwrite if overwrite is trueN)r.)r1�key�value�	overwrites    r#�	set_param�bundlespec.set_param`s%����#8�#8�8�).�!�!�#�&�9rc�$�SURUR4-/n[URR	55H=up#[U[5(aU(aSOSnOUnURSX$4-5 M? SRU5$)Ns%s-%ssyessnos%s=%s�;)	�compression�version�sortedr.�items�
isinstance�boolrr)r1�parts�param�	raw_valuer9s     r#�as_spec�bundlespec.as_specgs���T�-�-�t�|�|�<�<�=�� &�t�'<�'<�'B�'B�'D� E��E��)�T�*�*�"+����!���L�L��U�N�2�3�!F��y�y���rr&N�T)�__name__�
__module__�__qualname__�__firstlineno__r	�ibr?�wirecompressionr@�wireversionr.r/�propertyr2r5r;rH�__static_attributes__r&rr#r(r(Jsy���'�'�)�K��g�g�i�O��g�g�i�G��'�'�)�K��w�w�y���G�G�I�M�
�O��O�����/� rr(s01�02s03�s1)�v1�v2�v3�packed1�bundle2TF)�changegroup�
cg.version�obsolescence�phases�tagsfnodescache�revbranchcacherW)r[r\r]r^�streamr_r`�v3-expr\)rVrWrX�streamv2�streamv3-exprYrZz,Dict[bytes, Dict[bytes, Union[bool, bytes]]]�_bundlespeccontentoptsrZ>�gzip�none�bzip2c��[R"U5nUc'[S5nX0U4-n[R"U5eU$)z'make a boolean out of a parameter values'parameter %s should be a boolean ('%s'))r�	parseboolrr
�InvalidBundleSpecification)r8r9�b�msgs    r#�
param_boolrn�sD�����U�#�A��y��:�;���U�|����.�.�s�3�3��Hr)r]sobsolescence-mandatoryr^r[r_r`c��SU;aU04$0nURSS5up#[S5nURS5H�nSU;aXE-n[R"U5eURSS5upx[RU5n[RU5n[RU5n	U	bU	"Xx5nX�U'M� X!4$)zrparse bundlespec parameter section

input: "comp-version;params" string

return: (spec; {param_key: param_value})
r>rs:invalid bundle specification: missing "=" in parameter: %s�=)rrr
rk�urlreq�unquote�bundle_spec_param_processing�get)
�sr2r@�paramstr�err�prmr8r9�processs
          r#�_parseparamsrz�s����1�}��"�u��
�F�����a�(��G�
�I�
J�C�
�^�^�D�
!���q�=��'�C��2�2�3�7�7��W�W�T�1�%�
���n�n�S�!�����u�%��.�2�2�3�7�����C�'�E��s��"��?�rc��U(a(SU;a"[R"[S5U-5eURSS5SnSU;a�URSS5upEU[R
R;a"[R"[S5U-5e[U5upVU[;a"[R"[S5U-5eO�U(ae[U5upU[R
R;aRUnSn[RUR;aS	nO [RUR;aS	nU[;aS	nO:U[;aUS
:XaSnOSnUnO"[R"[S
5U-5eUS:Xa,U[;a"[R"[S5U-5eSU;a�[[!["US5RS55nU[R$-
nSSKJn	 U	R+UR,5n
X�-
nU(a:[R"[S5SR/[1U55-5eSU;aUSS	:XaSnUSS:XaSn[R3U05R55nUS:XdUS:XaS	n[R
R7U5n
U
R95upN[USn[;XNX_Xl5$)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.
�-sCinvalid bundle specification; must be prefixed with compression: %sr>rrs%s compression is not supporteds%%s is not a recognized bundle versionrVrWrYrgrhs+%s is not a recognized bundle specifications4compression engine %s is not supported on v1 bundlessrequirements�,)�	localrepos+missing support for repository features: %ss, rarcrbrdr\)r
rkrrr�compengines�supportedbundlenames�UnsupportedBundleSpecificationrzre�requirementsmod�GENERALDELTA_REQUIREMENTr�REVLOGV2_REQUIREMENT�_bundlespecv1compengines�setr�bytes�STREAM_IGNORABLE_REQUIREMENTS�r~�gathersupportedrequirements�uirrArt�copy�
forbundlename�
bundletyper()r�spec�strict�pre_argsr?r@r2r�
relevant_reqsr~�
supported_req�missing_reqsr5�enginerPrQs                r#�parsebundlespecr��s��B�$�d�"��.�.�
�9�
��	
�
�	
��z�z�$��"�1�%�H��x��#�z�z�$��2����d�.�.�C�C�C��6�6��4�5��C��
�'�w�/����0�0��6�6��:�;�g�E��
�1���z�#�D�)����4�#�#�8�8�8��K��G��7�7�4�;L�;L�L��� �5�5��9J�9J�J����":�:����
�+�
+��z�!�%��&���G��6�6��@�A�D�H��
�
�%��K�/G�G��2�2�
�E�F��
�
�	
��&� ��4��v�o�'>�?�E�E�d�K�L���?�H�H�H�	�	 �!�=�=�d�g�g�F�
�$�4����6�6��@�A��*�*�V�L�1�2�3��
��F���)���%�!�G��)��	�)�%�G�(�,�,�W�b�9�>�>�@�K��+���O�!;���
�
�
�
+�
+�K�
8�F�#)�#4�#4�#6� �K�(��1�-�@�K���g�F��rc�$�/nUR5H�nUR5nU(dMSUS0nUSSH�nURSS5upx[RR	U5n[RR	U5nX�U'US:XdMa[X5n	U	RUS'U	RUS'M� URU5 M� U$![Ra M�[Ra M�f=f)	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.
�URLrrNrp�
BUNDLESPECsCOMPRESSIONsVERSION)rrrrqrrr�r?r@r
rkr�r)
rru�mr"�fields�attrs�rawattrr8r9r(s
          r#�parseclonebundlesmanifestr�qs��	�A�����������������#���a�b�z�G� ���t�Q�/�J�C��+�+�%�%�c�*�C��K�K�'�'��.�E��#�J�
�m�#��!0��!=�J�,6�,B�,B�E�.�)�(2�(:�(:�E�*�%�"�&	
�����1�4
�H���7�7����;�;����s�)C!�!D�8D�Dc���URS:XaURS:XagURS:Xa1URS:Xa!URRSS5S;agg)NsUNrUTrTra)rWrbF)rPrQr5rt)r(s r#�isstreamclonespecr��s`���!�!�U�*�z�/E�/E��/N��	�"�"�e�+��"�"�e�+��"�"�&�&�y�$�7�;M�M��rs,^[a-z0-9]+:[0-9a-f]+(,[a-z0-9]+:[0-9a-f]+)*$c	���/nUGH�nURS5nU(dS[[Vs/sHovRU5PM sn5(d URRSU-5 MoURS5nU(aC[
XSS9n	U(a0[U	5(d URRSU-5 M�O'U(a URRS
U-5 M�SU;a6[R(d!URRSU-5 GM-S
U;aa[R "US
5nURR%5nUb*US-U:a!URRSU-5 GM�SU;GaO[&R)US5(d!URRSU-5 GM�Sn
0nUSR+S5H�nUR+S5unnUU;aUUU'O-UUU:wa$URRSUU4-5 Sn
 O�[,R.R0RU5nUcM~[3U5U"5R4S-:wa$URRSUU4-5 Sn
 O-U
S-
n
M� U
S:XaURRSU-5 U
S:XaGM�UR7U5 GM� U$s snf![Ra>n
URR[R"U
5S-5 Sn
A
GMTSn
A
f[Ra@n
URRS	U[R"U
54-5 Sn
A
GM�Sn
A
ff=f![R"a# URRSU-5 GM�f=f)a]Remove 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.
r�s8filtering %s because not a supported clonebundle scheme
r�T)r�s(filtering %s because not a stream clone
rNs1filtering %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
sDIGESTs+filtering %s due to a bad DIGEST attribute
rr}�:s+filtering %s due to conflicting %s digests
�s$filtering %s due to a bad %s digest
rs-filtering %s due to lack of supported digest
)rt�any�SUPPORTED_CLONEBUNDLE_SCHEMES�
startswithr��debugr�r�r
rkr�forcebytestrr�r�hassnir�	sizetoint�
ParseError�estimatememory�digest_regex�matchr�urlmod�
digesthandler�digest_algorithmsr�digest_sizer)rr �streamclonerequested�pullbundles�
newentries�entryr
�schemer�r(r�requiredram�	actualram�	supported�seen�digest_entry�algo�digest�digesters                   r#�filterclonebundleentriesr��s����J����i�i�����3�2O�P�2O��^�^�F�
#�2O�P�$
�$
�
�G�G�M�M�L���
�
��y�y��'���
�,�T��E�
�(�0A�*�0M�0M��G�G�M�M�D�s�J����"��G�G�M�M�"�$'�(�
�
��E�!�'�.�.��G�G�M�M�E��K�L���U�"�
�"�n�n�U�>�-B�C�����.�.�0�I��$��T�)9�K�)G����
�
�P���������%�%�e�I�&6�7�7����
�
�C�c�I����I��D� %�i� 0� 6� 6�t� <��+�1�1�$�7���f��t�#�!'�D��J��$�Z�6�)��G�G�M�M�G���+�&��!"�I��!�/�/�A�A�E�E�d�K���#���v�;�(�*�"8�"8�1�"<�<��G�G�M�M�@�C��;�N��!"�I���Q��	�)!=�,��>��G�G�M�M�I�C�O���A�~�����%� �G�J���E
Q��*�3�3�
����
�
�j�5�5�a�8�5�@�A����7�7�
����
�
�"�%(�*�*A�*A�!�*D�$E�F����
��,�#�#�
����
�
�H�3�N���	
�s;�L
�
?L�9N3�N0� 2M�N0�04N+�+N0�32O*�)O*c�H�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
g)
�clonebundleentryiz�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.
c��XlX lgr+)r9�prefers)r1r9r�s   r#�__init__�clonebundleentry.__init__%s���
��rc��URHrup#URRU5nURRU5nUb
UcXC:Xa gUb
UcXS:Xa gUbUcM]XE:XaMdXC:Xa gXS:Xa gMt g)N���rr)r�r9rt)r1�other�prefkey�	prefvalue�avalue�bvalues      r#�_cmp�clonebundleentry._cmp)s���"&�,�,��G��Z�Z�^�^�G�,�F��[�[�_�_�W�-�F��!�f�n��9L���!�f�n��9L���~��������"���"��
�7#/�>rc�*�URU5S:$�Nr�r��r1r�s  r#�__lt__�clonebundleentry.__lt__K����y�y���!�#�#rc�*�URU5S:�$r�r�r�s  r#�__gt__�clonebundleentry.__gt__Nr�rc�*�URU5S:H$r�r�r�s  r#�__eq__�clonebundleentry.__eq__Q����y�y���1�$�$rc�*�URU5S:*$r�r�r�s  r#�__le__�clonebundleentry.__le__Tr�rc�*�URU5S:�$r�r�r�s  r#�__ge__�clonebundleentry.__ge__Wr�rc�*�URU5S:g$r�r�r�s  r#�__ne__�clonebundleentry.__ne__Zr�r)r�r9N)rKrLrMrN�__doc__r�r�r�r�r�r�r�r�rSr&rr#r�r�s0���� �D$�$�%�%�%�%rr�c�^�URSS5mT(d[U5$SnTVs/sH
o2"U5PM snm[U4SjU55nUVs/sHoURPM sn$s snfs snf)Nsuisclonebundleprefersc��SU;a,[S5n[R"[S5U-US9eURSS5$)Nrps3each comma separated item should be key=value pairss&invalid ui.clonebundleprefers item: %s)�hintr)rr
�Abortr)rxr�s  r#�_split�&sortclonebundleentries.<locals>._splitcsH���q�=��K�L�D��+�+��;�<�q�@�t��
��w�w�t�Q��rc3�<># �UHn[UT5v� M g7fr+)r�)�.0�vr�s  �r#�	<genexpr>�)sortclonebundleentries.<locals>.<genexpr>ms����A��A�#�A�w�/�/��s�)�
configlist�listrAr9)r�r r�rxrB�ir�s      @r#�sortclonebundleentriesr�^sq����m�m�E�#8�9�G���G�}�� �#*�*�'�Q�v�a�y�'�*�G��A��A�A�E�"�#�U��G�G�U�#�#��+��$s�A2�A7)�returnr�)r
r�r�r�rJ)FF).�
__future__rr,�re�typingrrr�i18nr�
thirdpartyr	�
TYPE_CHECKINGr�r
rr�rr
r�r�utilsrrqr�CLONEBUNDLESCHEMEr$rr�rur(�_bundlespeccgversionsre�__annotations__r�rnrsrzr�r�r��compiler�r�r�r�r&rr#�<module>rs���#��	�
�����
�������	
����+��+��
� �����	!�����$ �$ ��$ �R�����������!� �
����� ��
����� ��
������!� �������!� ��	�u��	�u��]1H��D�1�d&<�E�%B��z�"�8��
� �)���"�!�
 ���<G�T!
�H
� �z�z�I�J��<A�r�j>%�>%�B$r