403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.216.220
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/manifest.cpython-313.pyc
�

6�h�g��&�SSKJr SSKrSSKrSSKrSSKrSSKrSSKJrJrJ	r	J
r
JrJrJ
r
JrJrJrJr SSKJr SSKJr SSKJrJrJr SSKJrJrJrJrJ r J!r!J"r"J#r#J$r$ SS	K%J&r& SS
K'J(r) \RT(aSSKJ+r+ \!RX"S5r-\$R\r.S
r/S:Sjr0Sr1"SS5r2"SS5r3S;Sjr4Sr51Skr6"SS5r7\-Rpr9"SS\&Rv5r<S<S=Sjjr=S>Sjr>S?Sjr?S@Sjr@SrA"S S!\&Rv5rB"S"S#\$R�5rDS$rE"S%S&\F5rG"S'S(\&R�5rI\S)rJ\\<\B4rK"S*S+\&R�5rM"S,S-\&R�5rO"S.S/\&R�5rQ"S0S1\&R�5rR"S2S3\&R�5rS"S4S5\B5rT"S6S7\S5rU"S8S9\I5rVg!\:a \7r9GN,f=f)A�)�annotationsN)�Callable�
Collection�Dict�Iterable�Iterator�List�Optional�Set�Tuple�Union�cast�)�_)�MatcherT)�bin�hex�nullrev)	�encoding�error�match�mdiff�pathutil�policy�pycompat�revlog�util)�
repository)�	constants)�
ByteString�parsersi�c#�Z# �U(aUSSS:wa[S5eSnUR5HvnUbX#:�a[S5eUnURS5upE[U5nUSSnU[;aUSSnUS-nOSnUSU-:wa[S	5eU[U5U4v� Mx g7f)
N����
�"Manifest did not end in a newline.�#Manifest lines not in sorted order.�r���Invalid manifest line)�
ValueError�
splitlines�split�len�_manifestflagsr)�nodelen�data�prev�l�f�n�nl�flagss        �4/usr/lib/python3/dist-packages/mercurial/manifest.py�_parser9Fs������R�S�	�U�"��>�?�?��D�
�_�_�
�������C�D�D����w�w�u�~���
��V���"�#����N�"��#�2��A��!�G�B��E�
��W����5�6�6���Q������s�B)B+c��/n/nUH7up4nURU5 URSU[U5U4-5 M9 [U5 SRU5$)N�%s%s%s
r()�appendr�_checkforbidden�join)�it�files�linesr4r5�fls      r8�_textrCasZ���E��E����b�
���Q��	���]�a��Q���_�4�5�	��E���8�8�E�?�r(c�6�\rSrSrSSjrSSjrS	Sjr\rSrg)
�lazymanifestiter�nc��SUlXlg�Nr)�pos�lm��selfrJs  r8�__init__�lazymanifestiter.__init__os������r(c��U$�N��rLs r8�__iter__�lazymanifestiter.__iter__s����r(c�l�URRUR5upUS:Xa1[U[5(deU=RS-
slUS$[U[5(deU=RS-
slURSU5nXU$![a [ef=f)Nr#rrr')	rJ�_getrI�
IndexError�
StopIteration�
isinstance�tuple�bytes�find)rLr1rI�zeroposs    r8�next�lazymanifestiter.nextvs���	 ������T�X�X�.�I�D��"�9��d�E�*�*�*�*��H�H��M�H���7�N��$��&�&�&�&����A�
���)�)�G�S�)���� � ���	 ���	 �s�'B"�"B3�rJrIN�rJ�
_LazyManifest�return�None�rdrE�rdr\�	�__name__�
__module__�__qualname__�__firstlineno__rMrSr_�__next__�__static_attributes__rQr(r8rErEns����!��Hr(rEc�6�\rSrSrSSjrSSjrS	Sjr\rSrg)
�lazymanifestiterentries�c��XlSUlgrHrarKs  r8rM� lazymanifestiterentries.__init__�s������r(c��U$rPrQrRs r8rS� lazymanifestiterentries.__iter__�rUr(c���URRUR5upUS:Xa.[U[5(deU=RS-
slU$[U[5(deURSU5nURSU5nUS:XdUS:XdXC:a[R"S5eXS-
UnU[;aXC-
S-
nO	XC-
S-
nSnUSURR-:wa[R"S5e[XRRURUS-U5nU=RS-
slXUXu4$![a [ef=f)Nr#rr'r$r*r)r()rJrWrIrXrYrZr[r\r]r�StorageErrorr/�_nodelen�	unhexlify�	extrainfo)rLr1rIr^�nlposr7�hlen�hashvals        r8r_�lazymanifestiterentries.next�s]��	 ������T�X�X�.�I�D��"�9��d�E�*�*�*�*��H�H��M�H��K��$��&�&�&�&��)�)�G�S�)���	�	�%��%���b�=�E�R�K�5�?��$�$�%=�>�>��Q�Y��'���N�"��?�Q�&�D��?�Q�&�D��E��1�t�w�w�'�'�'�'��$�$�%=�>�>���'�'�#�#�D�H�H�-�w��{�D�
��	
���A�
����!�7�2�2��/�	 ���	 �s�'E � E1raNrb�rdrp)rd�Tuple[bytes, bytes, bytes]rhrQr(r8rprp�s����3�8�Hr(rpc�V�[XX#-5nU(aU[US-/5-
nU$)N�)rr\)r1�extrarI�length�ss     r8ryry�s0���D�s�|�$�%�A��	�U�E�D�L�>�
"�"���Hr(c��X:�X:-
$rPrQ)�a�bs  r8�_cmpr��s��
�E�a�e��r(>r(�l�t�xc��\rSrSrSrSSSjjrSSjrSSjrSSjrSSjr	SS	jr
S S
jrS!SjrS"Sjr
S#S
jrS$SjrS%SjrS&SjrS'SjrS(S)SjjrS*SjrS+SjrS+SjrS,SjrS-SjrSrg).rc�a�A pure python manifest backed by a byte string.  It is supplimented with
internal lists as it is modified, until it is compacted back to a pure byte
string.

``data`` is the initial manifest data.

``positions`` is a list of offsets, one per manifest entry.  Positive
values are offsets into ``data``, negative values are offsets into the
``extradata`` list.  When an entry is removed, its entry is dropped from
``positions``.  The values are encoded such that when walking the list and
indexing into ``data`` or ``extradata`` as appropriate, the entries are
sorted by filename.

``extradata`` is a list of (key, hash, flags) for entries that were added or
modified since the manifest was created or compacted.
Nc��XlUcIURU5UlS/[UR5-UlX l/UlSUlgUSSUlUSSUlUSSUlX lX`lg)NrF)rx�	findlines�	positionsr.rzr1�	extradata�hasremovals)rLr0r1r�rzr�r�s       r8rM�_LazyManifest.__init__�sv�� �
���!�^�^�D�1�D�N��S�3�t�~�~�#6�6�D�N��I��D�N�$�D��&�q�\�D�N�&�q�\�D�N�&�q�\�D�N��I�*�r(c��U(d/$URS5nUS:Xd	USSS:wa[S5eS/nUSURS5nU[U5S-
:auUS:waoURUS-5 XS-URSUS-5nXT:a[S5eUnURSUS-5nU[U5S-
:aUS:waMoU$)Nr$r#r%rr'rr&)r]r+r.r<)rLr1rIr�r2�nextss      r8r��_LazyManifest.findlines�s�����I��i�i�����"�9��R�S�	�U�*��B�C�C��C�	��(�d�i�i��(�)���C��I��M�!�c�R�i����S�1�W�%��q��4�9�9�W�c�A�g�#>�?�E��|� �!G�H�H��D��)�)�E�3��7�+�C�
�C��I��M�!�c�R�i��r(c�r�URUnUS:�aURU4$URU*S-
S4$)Nrrr#)r�r1r�)rL�indexrIs   r8rW�_LazyManifest._get�sA���n�n�U�#���!�8��9�9�c�>�!��~�~�s�d�Q�h�'��+�+r(c��US:�a+URXRRSUS-5$URU*S-
S$)Nrr'r)r1r]r�)rLrIs  r8�_getkey�_LazyManifest._getkeysE���!�8��9�9�S�9�9�>�>�'�3��7�#C�D�D��~�~�s�d�Q�h�'��*�*r(c���Sn[UR5S-
nX#::aRX#-S-nURUnURU5n[X5nUS:XaU$US:aUS-
nOUS-nX#::aMRg)Nrrr)r#�r.r�r�r��rL�key�first�last�midpoint�nextpos�	candidate�rs        r8�bsearch�_LazyManifest.bsearchs������4�>�>�"�Q�&���m����*�H��n�n�X�.�G����W�-�I��S�$�A��A�v����q�5�#�a�<�D�$�q�L�E��m�r(c���Sn[UR5S-
nX#::aTX#-S-nURUnURU5n[X5nUS:XaUS4$US:aUS-
nOUS-nX#::aMTUS4$)Nrrr)TFr�r�s        r8�bsearch2�_LazyManifest.bsearch2s������4�>�>�"�Q�&���m����*�H��n�n�X�.�G����W�-�I��S�$�A��A�v� �$�'�'��q�5�#�a�<�D�$�q�L�E��m��u�~�r(c�*�URU5S:g$�Nr#)r��rLr�s  r8�__contains__�_LazyManifest.__contains__,s���|�|�C� �B�&�&r(c�,�[U[5(d[S5eURU5nUS:Xa[eURU5up4US:Xa![U[5(deUSUS4$[U[5(deURSU5nURSU5nSUs=::a[UR5::de e[UR5[UR5:XdeUS:XdUS:XdXe:a[R"S5eXe-
S-
nX6S-
UnU[;aUS-nOS	nUSUR-:wa[R"S5e[X0RUUS-U5n	X�4$)
Ns'getitem: manifest keys must be a bytes.r#rr)r'r$rr*r()rZr\�	TypeErrorr��KeyErrorrWr[r]r.r�rzrrwr/rxry)
rLr��needler1rIr^r{r|r7r}s
          r8�__getitem__�_LazyManifest.__getitem__/s����#�u�%�%��F�G�G����c�"���R�<��N��I�I�f�%�	���"�9��d�E�*�*�*�*���G�T�!�W�%�%��$��&�&�&�&��)�)�G�S�)���	�	�%��)���F�1�c�$�.�.�1�1�1�1�1�1��4�>�>�"�c�$�.�.�&9�9�9�9��b�=�E�R�K�5�?��$�$�%=�>�>����"���Q�Y��'���N�"��A�I�D��E��1�t�}�}�$�$��$�$�%=�>�>��D�.�.��"8�'�A�+�t�L����r(c�n�URU5up#U(d[eURUnURSUURUS-S-UlURSUURUS-S-UlUS:�a2URSUS-URUS-S-UlSUlgg)Nrrr'T)r�r�r�rzr1r�)rLr�r��found�curs     r8�__delitem__�_LazyManifest.__delitem__Ls����
�
�c�*�
����N��n�n�V�$�������0�4�>�>�&�1�*�,�3O�O��������0�4�>�>�&�1�*�,�3O�O����!�8��	�	�$�3��'�1�D�I�I�c�A�g�i�4H�H�D�I�#�D��	r(c��[U[5(d[S5e[U[5(a[	U5S:wa[S5eUSn[U[5(a[	U5S;a[S5eUSn[U[5(a[	U5S:�a[SU5eURU5upVU(arURUnUS:aXUS4URU*S-
'gURRXUS45 [	UR5*URU'gURRXUS45 URSU[	UR5*/-URUS-UlURSUS/-URUS-Ul	g)	Ns-setitem: manifest keys must be a byte string.r)s1Manifest values must be a tuple of (node, flags).r��� s-node must be a 20-byte or 32-byte byte stringrs'flags must a 0 or 1 byte string, got %r)
rZr\r�r[r.r�r�r�r<rz)rLr��valuer}r7r�r�rIs        r8�__setitem__�_LazyManifest.__setitem__Ys����#�u�%�%��L�M�M��%��'�'�3�u�:��?��D��
���(���'�5�)�)�S��\��-I��L�M�M��a����%��'�'�3�u�:��>��F��N�N��
�
�c�*�
����.�.��(�C��Q�w�,/�%��(�+C�����t�a�x�(����%�%�s�U�1�X�&>�?�*-�d�n�n�*=�)=����v�&�
�N�N�!�!�3��q��":�;����w��'�����'�'�(�)��.�.���)�*�
�N����w��'�1�#�-����v�w�0G�G�
�Nr(c��[URURURURUR
UR5$rP)�
_lazymanifestrxr1r�rzr�r�rRs r8�copy�_LazyManifest.copy|s;����M�M��I�I��N�N��N�N��N�N����

�	
r(c��[UR5S:XaUR(dg/nSnSnS/[UR5-UlU[UR5:Ga<URUS:�GaURUnUnX0RU'US-
nU[UR5:XdURUS:aOdUR(a.UR
R
SX@RU5S:waO%X0RUU-
-
nURUnM�UR
R
SU5nUS:waUS-
nX6U-
-
nURUR
XV5 GO	U[UR5:a�URUS:a�URUnURU*S-
nURURU55 X0RU'Sn[US5S:�aSn[US5U:�a![USUS-5URU'U[US5-
nUS-
nU[UR5:aURUS:aM�U[UR5:aGM<S	RU5UlS
Ul/Ulg)Nrrs
r#r$r��r�r(F)r.r�r�r�rzr1r]r<�_pack�ordr>)	rLr3�i�offsetr��last_cut�end_cut�tr|s	         r8�_compact�_LazyManifest._compact�sz���t�~�~��!�#�D�,<�,<����
������s�4�>�>�2�2����#�d�n�n�%�%��~�~�a� �A�%��n�n�Q�'����
�(.�N�N�1�%���F�A��C����/�/�4�>�>�!�3D�q�3H���(�(� �I�I�N�N�9�c�>�>�!�;L�M�����n�n�Q�/�#�5�5�F��.�.��+�C�%�&�)�)�.�.���4���b�=��q�L�G��C�-�'��������8�4�5��#�d�n�n�-�-�$�.�.��2C�a�2G��.�.��+�C�����t�a�x�0�A��H�H�T�Z�Z��]�+�(.�N�N�1�%��D��1�Q�4�y�2�~�!���1�Q�4�y�4�'�,/��!��T�A�X��,?����q�)��c�!�B�%�j�(�F���F�A��#�d�n�n�-�-�$�.�.��2C�a�2G�C�#�d�n�n�%�%�^�H�H�Q�K��	� �����r(c�h�USn[U5S;deUSS-[U5-US-S-$)Nrr�rr'r)r$)r.r)rL�dr5s   r8r��_LazyManifest._pack�sB��
�a�D���1�v��!�!�!���t�g�~��A��&��1��-��5�5r(c�:�UR5 UR$rP)r�r1rRs r8�text�_LazyManifest.text�s���
�
���y�y�r(c���0nUR5H5upEnXA;a	XV4S4X4'MXnXV4U:wa	XV4U4X4'M(U(dM1SX4'M7 UR5HupGnX@;dM
SXv44X4'M U$)z2Finds changes between the current manifest and m2.�Nr(N)�iterentries)rL�m2�clean�diff�fn�e1r7�e2s        r8r��_LazyManifest.diff�s�����!�-�-�/�M�B�E��|��;��3����V���;�"�$� "�{�B��D�H��U�#�D�H�0� �^�^�-�M�B�E��~�&���3���.��r(c��[U5$rP)rprRs r8r��_LazyManifest.iterentries�s
��&�t�,�,r(c��[U5$rP�rErRs r8�iterkeys�_LazyManifest.iterkeys��
����%�%r(c��[U5$rPr�rRs r8rS�_LazyManifest.__iter__�r�r(c�,�[UR5$rP)r.r�rRs r8�__len__�_LazyManifest.__len__�s���4�>�>�"�"r(c��[URS5nUR5Hup4nU"U5(dMXE4X#'M U$r�)r�rxr�)rL�filterfn�cr4r5rBs      r8�
filtercopy�_LazyManifest.filtercopy�sB���$�-�-��-���(�(�*�H�A�"���{�{��u���+��r()rxr1r�rzr�r�)NNNF)r0�intr1r\r��bool)r1r\rdz	List[int])r�r�rdz4Tuple[Union[bytes, Tuple[bytes, bytes, bytes]], int]rg)r�r\rdr�)r�r\rdzTuple[int, bool]�r�r\rdr��r�r\rd�Tuple[bytes, bytes]�r�r\rdre)r�r\r�r�)rdrc�rdre)r�r�rdr\�rdr �F)r�rcr�r�rd�ZDict[bytes, Optional[Tuple[Tuple[Optional[bytes], bytes], Tuple[Optional[bytes], bytes]]]]rrf�rdr�)r�zCallable[[bytes], bool]rdrc)rirjrkrl�__doc__rMr�rWr�r�r�r�r�r�r�r�r�r�r�r�r�r�rSr�r�rnrQr(r8rcrc�s����*���!�+��+��+��+�.�"	,��	,�	=�	,�+�
�$�('� �:$�!�F	
�9�v6�
�
05����(,��
��8-�&�&�#�r(rcc�r�\rSrSrS!S"SjjrS#SjrS$SjrS%SjrS&Sjr\r	S'Sjr
S(SjrS)S	jrS*S
jr
S+SjrS+SjrS,S
jrS-S.Sjjr\S/Sj5rS/SjrS0SjrS1SjrS2SjrS3SjrS4S5SjjrS6SjrS-S7SjjrS#SjrS8SjrS9SjrS9SjrS:Sjr S;Sjr!S<Sjr"S r#g)=�manifestdictic�0�Xl[X5UlgrP)rxr��_lm)rLr0r1s   r8rM�manifestdict.__init__s���
� ��/��r(c�&�URUS$rH�rr�s  r8r��manifestdict.__getitem__s���x�x��}�Q��r(c� �URU$rPrr�s  r8r]�manifestdict.find
s���x�x��}�r(c�,�[UR5$rP�r.rrRs r8r��manifestdict.__len__
s���4�8�8�}�r(c�2�[UR5S:g$rHrrRs r8�__nonzero__�manifestdict.__nonzero__s���4�8�8�}��!�!r(c�$�X#4URU'grPr)rLr��noder7s    r8�set�manifestdict.sets��������
r(c�B�X RU54URU'grP)r7r)rLr�rs   r8r��manifestdict.__setitem__s���j�j��o�-�����
r(c�&�UcgXR;$�NFrr�s  r8r��manifestdict.__contains__s���;���h�h��r(c��URU	grPrr�s  r8r��manifestdict.__delitem__"s
���H�H�S�Mr(c�6�URR5$rP)rrSrRs r8rS�manifestdict.__iter__%����x�x� � �"�"r(c�6�URR5$rP)rr�rRs r8r��manifestdict.iterkeys(rr(c�4�[UR55$rP��listr�rRs r8�keys�manifestdict.keys+����D�M�M�O�$�$r(Nc��Ub[[R"US5n[URU55nURU5Vs1sHoDU;dM
UiM sn$UVs1sHoDU;dM
UiM sn$s snfs snf)�7Set of files in this manifest that are not in the otherc��grPrQ)�path�msgs  r8�<lambda>�)manifestdict.filesnotin.<locals>.<lambda>1s��tr()�matchmod�badmatchr�walk)rLr�r�sm2r4s     r8�
filesnotin�manifestdict.filesnotin.ss�����%�%�e�-C�D�E��b�g�g�e�n�%�C�#�y�y��/�@�/�!�C�<�A�/�@�@��/�4�a�B�;��4�/�/��A��/s�		A9�A9�#	A>�0A>c�.�[R"U5$rP�r�dirsrRs r8�_dirs�manifestdict._dirs6����}�}�T�"�"r(c��UR$rP�r6rRs r8r5�manifestdict.dirs:����z�z�r(c��XR;$rPr:)rL�dirs  r8�hasdir�manifestdict.hasdir=s���j�j� � r(c��^�UR5n[U5S:=(aC UR5=(d, UR5=(a [	U4SjU55$)zfChecks whether we can correctly and quickly iterate over matcher
files instead of over manifest files.�dc3�,># �UH	oT;v� M g7frPrQ)�.0r�rLs  �r8�	<genexpr>�.manifestdict._filesfastpath.<locals>.<genexpr>Fs����&B�E�b�T�z�E�s�)r@r.�isexact�prefix�all)rLrr@s`  r8�_filesfastpath�manifestdict._filesfastpath@sN������
���5�z�C��
��M�M�O�
D�����B�3�&B�E�&B�#B�	
r(c#�# �UR5(a[U5Shv�N g[UR55nUR	U5(a[U5HnX0;dM
Uv� M gUH,nX2;aUR
U5 U"U5(dM(Uv� M. URS5 [U5H-nURU5(aMURUS5 M/ gN�7f)z�Generates matching file names.

Equivalent to manifest.matches(match).iterkeys(), but without creating
an entirely new manifest.

It also reports nonexistent files by marking them bad with match.bad().
Nr()
�always�iterrr@rJ�sorted�remove�discardr?�bad�rLr�fsetr�s    r8r/�manifestdict.walkIs�����<�<�>�>��D�z�!�!���5�;�;�=�!�����u�%�%��T�l���:��H�#�
��B��z����B���R�y�y����	
���S����,�B��;�;�r�?�?��	�	�"�d�#��/
"�s"�$C;�C9�AC;�0/C;�#;C;�"C;c��UR5(aUR5$URU5(aR[UR5nUR
nUR
5HnXC;dM
X4UR
U'M U$[UR5nUR
RU5UlU$)z6generate a new manifest filtered by the match argument)rMr�rJrrxrr@r�)rLr�mrJr�s     r8�_matches�manifestdict._matchesms����<�<�>�>��9�9�;�����u�%�%��T�]�]�+�A����B��k�k�m���8� "��A�E�E�"�I�$��H�����'�����#�#�E�*����r(c��U(a1URU5nURU5nURXS9$URRURU5$)�"Finds changes between the current manifest and m2.

Args:
  m2: the manifest to which this manifest should be compared.
  clean: if true, include files unchanged between these manifests
         with a None value in the returned dictionary.

The result is returned as a dict with filename as key and
values of the form ((n1,fl1),(n2,fl2)), where n1/n2 is the
nodeid in the current/other manifest and fl1/fl2 is the flag
in the current/other manifest. Where the file does not exist,
the nodeid will be None and the flags will be the empty
string.
�r�)rXr�r)rLr�rr��m1s     r8r��manifestdict.diff~sM��2����u�%�B����U�#�B��7�7�2�7�+�+��x�x�}�}�R�V�V�U�+�+r(c�T�U[;a[S5eXU4URU'g)N�Invalid manifest flag set.)r/r�r)rLr��flags   r8�setflag�manifestdict.setflag�s)���~�%��9�:�:��	�4������
r(c�L�URUS$![a Us$f=frH�rr�)rLr��defaults   r8�get�manifestdict.get�s.��	��8�8�C�=��#�#���	��N�	�s��#�#c�H�URUS$![a gf=f)Nrr(rer�s  r8r7�manifestdict.flags�s,��	��8�8�C�=��#�#���	��	�s��
!�!c�n�[UR5nURR5UlU$rP)rrxrr�)rLr�s  r8r��manifestdict.copy�s&������'�����
�
�����r(c�D�SURR55$)Nc3�*# �UH	oSSv� M g7f�Nr)rQ�rD�xs  r8rE�%manifestdict.items.<locals>.<genexpr>�����6�5�!�"�1��5����rr�rRs r8�items�manifestdict.items����6�t�x�x�3�3�5�6�6r(c�D�SURR55$)Nc3�*# �UH	oSSv� M g7frorQrps  r8rE�)manifestdict.iteritems.<locals>.<genexpr>�rsrtrurRs r8�	iteritems�manifestdict.iteritems�rxr(c�6�URR5$rPrurRs r8r��manifestdict.iterentries�s���x�x�#�#�%�%r(c�6�URR5$rP)rr�rRs r8r��manifestdict.text�s���x�x�}�}��r(c� �/nSnSnS/nSn[R"U5n[U5n[U5[:a�UH�up�[X�U5up{U
(d#URU	up�SU	[U5U
4-nOX{:Xa[[S5U	-5eSnUb-XG::a(XW:�a#X[:aUnU(aURU5 M�M�Ub"URXESRU545 UnUnU/nM� Ub"URXESRU545 [X5unnUU4$[UR55n[R "[R"U5[R"U55nUU4$)z�Given a base manifest text as a bytearray and a list of changes
relative to that text, compute a delta that can be used by revlog.
Nr(rr;s!failed to remove %s from manifest)r�bufferr"r.�FASTDELTA_TEXTDIFF_THRESHOLD�_msearchrr�AssertionErrorrr<r>�
_addlistdelta�	bytearrayr�r�textdiff)rL�base�changes�delta�dstart�dend�dline�start�addbufr4�todelete�end�hrBr3�	deltatext�	arraytexts                 r8�	fastdelta�manifestdict.fastdelta�s�����������������T�"���w�-���w�<�6�6� '���%�f��7�
��� �H�H�Q�K�E�A�%��C��F�B��7�A��|�,��B�C�a�G����A��%�&�/�d�m��z�"������Q����)����f�C�H�H�U�O�%D�E�"�F��D��C�E�/ '�2�!����f�C�H�H�U�O�<�=�#0��#=� �I�y��)�#�#�"�$�)�)�+�.�I�������D�!�4�;�;�y�#9��I��)�#�#r()rrx�r()r0r�r1r )r�r\rdr\r�r��rdr�)r�r\rr\r7r\rdre)r�r\rr\rdrer�r��rd�Iterator[bytes]�rdzList[bytes]rP)rd�
Set[bytes]�rdz
pathutil.dirs�r>r\rdr�)rrrdr��rrrdr�)rrrdrr)r�rr�Optional[MatcherT]r�r�rdr�)r�r\rar\rdre)r�r\rd�Optional[bytes]�rdr)rdzIterator[Tuple[bytes, bytes]])rdz$Iterator[Tuple[bytes, bytes, bytes]]r�)r�r r��Iterable[Tuple[bytes, bool]]rdzTuple[ByteString, ByteString])$rirjrkrlrMr�r]r�r�__bool__rr�r�r�rSr�r#r1�
propertycacher6r5r?rJr/rXr�rbrgr7r�rvr|r�r�r�rnrQr(r8rrs���0� ���"�
�H�$�.��
�#�#�%�0��#��#��!�
�"$�H�(%)��	,��,�"�,��	,�

�,�>(�
���
7�7�&��7$��7$�)E�7$�	&�7$r(rc�z^^	�SU	U4SjjnU(dX"4$[T5m	U(dT	nX#:agX#-S-nUnUS:�a%TUS-
US:waUS-nUS:�aTUS-
US:waMU"US5n[TXg5U:aU"US-S5S-nOUnX#:aMgU"US5nTX'nX:XaU"US-S5nX'S-4$X"4$)	z�return a tuple (start, end) that says where to find s within m.

If the string is found m[start:end] are the line containing
that string.  If start == end the string was not found and
they indicate the proper sorted insertion point.
c�Z>�UT:a#TXS-U:waUS-
nUT:a
TXS-U:waMU$)NrrQ)r�r��lenmrWs  ��r8�advance�_msearch.<locals>.advances?����$�h�1�Q�Q��<�1�,�
��F�A��$�h�1�Q�Q��<�1�,��r(r)rrr$r'�()r�r�r�r\)r.r\)
rWr��lo�hir��midr�r�r�r�s
`        @r8r�r��s������

��x���q�6�D�
�
��
�'��w�1�n�����a�i�A�e�a�i�%�0�E�9��Q�J�E��a�i�A�e�a�i�%�0�E�9��e�U�#����5����"���r��5�)�A�-�B��B�
�'��"�e�
�C�
�b�I�E��z��c�B�h��&���!�G�}���x�r(c��UHEnSU;dSU;dM[R"[S5[R"U5-5e g)z'Check filenames for illegal characters.r$�
s)'\n' and '\r' disallowed in filenames: %rN)rrwrr�bytestr)r3r4s  r8r=r=%sH��
���A�:��!���$�$��@�A��"�"�1�%�&��
�r(c��Sn[5nUH#upEnX0X$-
nU(aU[U5-
nUnM% X0US-
nSRSU55nXs4$)Nrr(c	3�p# �UH,upn[R"SX[U55U-v� M. g7f)s>lllN)�struct�packr.)rDr�r��contents    r8rE� _addlistdelta.<locals>.<genexpr>Cs2����#$��E��	���G�U��W��6��@�#$�s�46)r�r>)�addlistrq�currentposition�
newaddlistr�r�r�r�s        r8r�r�1s{���O���J� ���G��o�4�4�
���)�G�,�,�J��� !��/�*�+�+�J�����#$���I�� � r(c�L�SU;aURSS5upUS-U4$SU4$)N�/rr()r-)r4r>�subpaths   r8�_splittopdirr�Js3���q�y��w�w�t�Q�'����T�z�7�"�"��A�v�
r(c��grPrQ)r�s r8r+r+Rs��$r(c���\rSrSr%S\S'S\S'S\S'S\S	'S\S
'S;S<SjjrS=SjrS>S
jrS?SjrS@Sjr	SASjr
SBSjrSCSjr\r
SCSjr\R SDSj5rSDSjrSDSjrSESjrSFSjrSGSjr\rSHSjrSISjrSHSjrSJSjrSKSLSjjrSMS jrSMS!jrSNS"jrSOS#jr SPS$jr!SQS%jr"S>S&jr#SRS'jr$SSS(jr%SKSTS)jjr&\'SUS*j5r(SUS+jr)SVS,jr*SWS-jr+SWS.jr,SXS/jr-SXS0jr.SYS1jr/SZS[S2jjr0S\S3jr1S]S4jr2S^S5jr3S^S6jr4S_S7jr5S`S8jr6SKSaS9jjr7S:r8g)b�treemanifestiUr\�_dirzDict[bytes, treemanifest]r6r��_dirty�Dict[bytes, bytes]�_files�_flagsc�@�X lXlURRUlURRUl[Ul[UlSUl	0Ul
0Ul0Ul0Ul
U(aSnURX45 SUl	gg)NFc��[S5e)Ns4treemanifest constructor only accepts flat manifests)r�)�subdir�subms  r8�readsubtree�*treemanifest.__init__.<locals>.readsubtreens��$�K��r(T)r��
nodeconstants�nullid�_noder0rx�_noop�	_loadfunc�	_copyfuncr�r6�	_lazydirsr�r��parse)rLr�r>r�r�s     r8rM�treemanifest.__init__\s����	�*���'�'�.�.��
��*�*�2�2��
������������
�
�	
��
�������
�

�J�J�t�)��D�K�r(c� �URU-$rP�r�)rLr)s  r8�_subpath�treemanifest._subpathvs���y�y�4��r(c�(�URnURnURR5HBunupEnU(a!U"U"U5U5R	5X'M1U"U"U5U5X'MD URR5 grP)r6r�r�rvr��clear)rL�selfdirsr�r�rr��docopys       r8�_loadalllazy�treemanifest._loadalllazyysx���:�:���-�-��.2�n�n�.B�.B�.D�*�A�*��6��)�'�!�*�d�;�@�@�B���)�'�!�*�d�;���	/E�
	
�����r(c�&�URRU5nUbsUup4nU(a4U"URU5U5R5URU'O%U"URU5U5URU'URU	ggrP)r�rgr�r�r6)rLr��vrr�r�s      r8�	_loadlazy�treemanifest._loadlazy�s|���N�N���q�!���=�()�%�D�v�� +�D�M�M�!�,<�d� C� H� H� J��
�
�1�
� +�D�M�M�!�,<�d� C��
�
�1�
����q�!�
r(c��U(dgUS:XdUS:XaUR5 g[[[U5nURnUHnU"US-5 M U$)N�all�thisr�)r�rrr\r�)rL�visit�loadlazy�ks    r8�_loadchildrensetlazy�!treemanifest._loadchildrensetlazy�s[�����F�?�e�w�.�������S��Z��'���>�>���A��Q��X����r(c��/nURR5HBupEURRU5nUbUSUS:wdM1URU5 MD URR5H'upEXAR;dMURU5 M) UH%nUR	U5 UR	U5 M' g)a=load items in t1 and t2 if they're needed for diffing.

The criteria currently is:
- if it's not present in _lazydirs in either t1 or t2, load it in the
  other (it may already be loaded or it may not exist, doesn't matter)
- if it's present in _lazydirs in both, compare the nodeid; if it
  differs, load it in both
Nr)r�rvrgr<r�)rL�t1�t2�
toloadlazyr��v1�v2s       r8�
_loaddifflazy�treemanifest._loaddifflazy�s����
��\�\�'�'�)�E�A����!�!�!�$�B��z�R��U�b��e�^��!�!�!�$�*��\�\�'�'�)�E�A����$��!�!�!�$�*��A��L�L��O��L�L��O�r(c���UR5 [UR5nUR5 URR5HnXR
5-
nM U$rP)�_loadr.r�r�r6�valuesr�)rL�sizerWs   r8r��treemanifest.__len__�sO���
�
���4�;�;����������"�"�$�A��I�I�K��D�%��r(c�,�UR5(+$rP��_isemptyrRs r8r�treemanifest.__nonzero__�s���=�=�?�"�"r(c�j�UR5 UR(d@UR(a0[SURR	555(agUR5 UR(+=(d* [
SURR	555$)Nc3�J# �UHoR5(+v� M g7frPr��rDrWs  r8rE�(treemanifest._isempty.<locals>.<genexpr>�s���M�9L�A�:�:�<�/�/�9L�s�!#Fc3�@# �UHoR5v� M g7frPr�rs  r8rEr�s���$O�;N�a�Z�Z�\�\�;N�s�)r�r�r6�anyr�r�rIrRs r8r��treemanifest._isempty�sn���
�
���;�;��J�J�3�M����9J�9J�9L�M�M�M�������:�:�~�O��$O�4�:�:�;L�;L�;N�$O�!O�Or(c��SUR[UR5[UR[
L5UR[U54-$)Ns;<treemanifest dir=%s, node=%s, loaded=%r, dirty=%r at 0x%x>)r�rr�r�r�r�r��idrRs r8�__repr__�treemanifest.__repr__�sH��
K��	�	��D�J�J���T�^�^�u�,�-�����4���
�		
r(c��UR$)zuThe directory that this tree manifest represents, including a
trailing '/'. Empty string for the repo root directory.r�rRs r8r>�treemanifest.dir�s���y�y�r(c�@�UR(aeUR$)z�This node of this instance. nullid for unsaved instances. Should
be updated when the instance is read or written from a revlog.
�r�r�rRs r8r�treemanifest.node�s���;�;����z�z�r(c��XlSUlgr)r�r��rLrs  r8�setnode�treemanifest.setnode�s���
���r(c#�# �UR5 UR5 [[R"UR
R
5URR
555H]upXR;a1URU5X RRUS54v� MEUR5Shv�N M_ gN	7fr�)r�r�rO�	itertools�chainr6rvr�r�r�rgr��rL�pr5s   r8r��treemanifest.iterentries�s����	
�
�
��������O�O�D�J�J�,�,�.����0A�0A�0C�D�
�D�A��K�K���m�m�A�&��;�;�?�?�1�c�+B�B�B��=�=�?�*�*�

�+�s�C	C�C�
Cc#�~# �UR5 UR5 [[R"UR
R
5URR
555HCupXR;aURU5U4v� M+UR
5Shv�N ME gN	7frP)	r�r�rOrrr6rvr�r�rs   r8rv�treemanifest.items�s�����
�
��������O�O�D�J�J�,�,�.����0A�0A�0C�D�
�D�A��K�K���m�m�A�&��)�)��7�7�9�$�$�

�%�s�B/B=�1B;�2
B=c#�<# �UR5 UR5 [[R"UR
UR55H>nXR;aURU5v� M'UR
UShv�N M@ gN	7frP)r�r�rOrrr6r�r�)rLrs  r8r��treemanifest.iterkeyssl����
�
�������	����
�
�D�K�K�@�A�A��K�K���m�m�A�&�&��:�:�a�=�(�(�	B�)�s�BB�B�
Bc�4�[UR55$rPr!rRs r8r#�treemanifest.keysr%r(c�"�UR5$rP)r�rRs r8rS�treemanifest.__iter__s���}�}��r(c���UcgUR5 [U5up#U(a?URU5 X R;agURUR	U5$XR
;$r)r�r�r�r6r�r��rLr4r>r�s    r8r��treemanifest.__contains__s`���9���
�
��#�A������N�N�3���*�*�$���:�:�c�?�/�/��8�8����#�#r(Nc��UR5 [U5up4U(a@URU5 X0R;aU$URUR	XB5$UR
R	X5$rP)r�r�r�r6rgr�)rLr4rfr>r�s     r8rg�treemanifest.get s`���
�
��#�A������N�N�3���*�*�$����:�:�c�?�&�&�w�8�8��;�;�?�?�1�.�.r(c���UR5 [U5up#U(a/URU5 URUR	U5$UR
U$rP)r�r�r�r6r�r�r"s    r8r��treemanifest.__getitem__,sL���
�
��#�A������N�N�3���:�:�c�?�.�.�w�7�7��;�;�q�>�!r(c�>�UR5 [U5up#U(a?URU5 X R;agURUR	U5$XR
;dXR;agURRUS5$r�)r�r�r�r6r7r�r�rgr"s    r8r7�treemanifest.flags6su���
�
��#�A������N�N�3���*�*�$���:�:�c�?�(�(��1�1��N�N�"�a�:�:�o���;�;�?�?�1�c�*�*r(c��UR5 [U5up#U(a/URU5 URUR	U5$UR
UURRUS54$r�)r�r�r�r6r]r�r�rgr"s    r8r]�treemanifest.findDs`���
�
��#�A������N�N�3���:�:�c�?�'�'��0�0��;�;�q�>�4�;�;�?�?�1�c�#:�:�:r(c�j�UR5 [U5up#U(a_URU5 URUR	U5 URUR5(a
URU	O)URU	XR;a
URU	SUlg�NT)	r�r�r�r6r�r�r�r�r�r"s    r8r��treemanifest.__delitem__Ns����
�
��#�A������N�N�3���J�J�s�O�'�'��0��z�z�#��'�'�)�)��J�J�s�O�����A���K�K���K�K��N���r(c���UceU[;a[S5eUR5 [U5upEU(arUR	U5 X@R
;a2[
URURU55UR
U'UR
URXRU5 O-[U5S;deX RU'X0RU'SUl
g)z+Set both the node and the flags for path f.Nr`r�T)r/r�r�r�r�r6r�r�r�rr.r�r�r�)rLr4rr7r>r�s      r8r�treemanifest.set^s���������&��9�:�:��
�
��#�A������N�N�3���*�*�$�".��&�&��
�
�c�(:�#��
�
�3��
�J�J�s�O����u�5��t�9��(�(�(�!�K�K��N�"�K�K��N���r(c��UceUR5 [U5up4U(aqURU5 X0R;a2[	UR
UR
U55URU'URURXB5 O[U5S;deX RU'SUl
g)Nr�T)r�r�r�r6r�r�r�r�r.r�r�)rLr4r5r>r�s     r8r��treemanifest.__setitem__rs����}��}��
�
��#�A������N�N�3���*�*�$�".��&�&��
�
�c�(:�#��
�
�3��
�J�J�s�O�'�'��3�
�q�6�X�%�%�%��K�K��N���r(c���UR[La UR[solU"U5 gUR[La UR[so lU"U5 ggrP)r�r�r�)rL�lf�cfs   r8r��treemanifest._load�sM���>�>��&�!%�����B���t�H�
�^�^�5�
(�!%�����B���t�H�)r(c��U[;a[S5eUR5 [U5up4U(aqUR	U5 X0R
;a2[
URURU55UR
U'UR
URXB5 OX RU'SUlg)z/Set the flags (symlink, executable) for path f.r`TN)r/r�r�r�r�r6r�r�r�rbr�r�)rLr4r7r>r�s     r8rb�treemanifest.setflag�s�����&��9�:�:��
�
��#�A������N�N�3���*�*�$�".��&�&��
�
�c�(:�#��
�
�3��
�J�J�s�O�#�#�G�3�"�K�K��N���r(c�,^�[TRTR5nTRUlTRUlTR
[La,U4SjnTR[La
U"U5 U$X!lU$TR
UlU$)Nc
��>�TR5 TRR5VVVVs0sH
unup#oAX#S4_M snnnnUlURnTRR5HupUR	5XQ'M [
R	TR5Ul[
R	TR5Ulgs snnnnfr-)r�r�rvr6r��dictr�r�)r�r�r5r�r��sdirsr�rLs       �r8r��$treemanifest.copy.<locals>._copyfunc�s�����
�
��8<���8L�8L�8N��8N���9�A�!��d�|�O�8N�������� �J�J�,�,�.�D�A� �v�v�x�E�H�/��9�9�T�[�[�1����9�9�T�[�[�1����s�C
)r�r�r�r�r�r�r�r�)rLr�r�s`  r8r��treemanifest.copy�s|����D�.�.��	�	�:���Z�Z��
��k�k����>�>�U�"�	
2��~�~��&��$��
��"+����"�^�^�D�N��r(c��^^^�U(aHUR5(d3TRU5nURU5nURU5$[5mUUU4SjmT"TU5 T$)r'c�>>�URUR:Xa#UR(dUR(dgUR5 UR5 TRX5 URR5HLup#X!R;aURUnT"X45 M-TR
UR55 MN URH4nXQR;dMTRURU55 M6 grP)r�r�r�r�r6rv�updater�r��addr�)	r�r�r�r]r�r��_filesnotinr@rLs	      ���r8rC�,treemanifest.filesnotin.<locals>._filesnotin�s�����x�x�2�8�8�#�B�I�I�b�i�i���H�H�J��H�H�J����r�&������)������=����!��B���'��L�L�����/�*��i�i���Y�Y�&��I�I�b�k�k�"�o�.� r()rMrXr1r)rLr�rr]rCr@s`   @@r8r1�treemanifest.filesnotin�sZ������������u�%�B����U�#�B��=�=��$�$����	/�"	�D�"���r(c�.�[R"U5$rPr4rRs r8�_alldirs�treemanifest._alldirs�r8r(c��UR$rP)rGrRs r8r5�treemanifest.dirs�s���}�}�r(c��UR5 [U5up#U(a?URU5 X R;aURUR	U5$gUS-nX@R;=(d X@R
;$)NFr�)r�r�r�r6r?r�)rLr>�topdirr��dirslashs     r8r?�treemanifest.hasdir�so���
�
��%�c�*�����N�N�6�"����#��z�z�&�)�0�0��8�8����:���:�:�%�C��^�^�)C�Cr(c#�# �UR5(a[U5Shv�N g[UR55nUR	U5HnX2;aURU5 Uv� M UR
S5 [U5H-nURU5(aMURUS5 M/ gN�7f)zhGenerates matching file names.

It also reports nonexistent files by marking them bad with match.bad().
Nr()
rMrNrr@�_walkrPrQrOr?rRrSs    r8r/�treemanifest.walk�s����
�<�<�>�>��D�z�!�!���5�;�;�=�!���*�*�U�#�B��z����B���H�	$�	
���S����,�B��;�;�r�?�?��	�	�"�d�#��
"�s�$C�C�BC�.Cc#��# �URURSS5nU(dgUR5 URU5n[	[UR5[UR5-5HpnX0R;a&URU5nU"U5(aUv� M6M8U(aUSSU;dMJURURU5Shv�N Mr gN	7f)z5Recursively generates matching file names for walk().Nr#)
�visitchildrensetr�r�r�rOr"r6r�r�rP)rLrr�r�fullps     r8rP�treemanifest._walks�����&�&�t�y�y��"�~�6����	
�
�
���)�)�%�0����T�Z�Z�(�4����+<�<�=�A��K�K���
�
�a�(����<�<��K� ���#�2��%��#�z�z�!�}�2�2�5�9�9�9�>�:�s�CC5�!C5�)C3�*
C5c�n�UR5(aUR5$URU5$)zCrecursively generate a new manifest filtered by the match argument.)rMr��_matches_inner)rLrs  r8rX�treemanifest._matchess*���<�<�>�>��9�9�;���"�"�5�)�)r(c�l�UR5(aUR5$URURSS5nUS:XaUR5$[	UR
UR5nU(dU$UR
5 URHynUS:waXB;aMURU5nU"U5(dM0URUURU'X@R;dM]URUURU'M{ URU5nURR5HMupgU(aUSSU;aMURU5nUR5(aM?X�RU'MO UR5(dSUlU$)Nr#r�r�T)rMr�rSr�r�r�r�r�r�r�r�r6rvrWr�r�)	rLrr��retr�rTr>r�rWs	         r8rW�treemanifest._matches_innersY���<�<�>�>��9�9�;���&�&�t�y�y��"�~�6���F�?��9�9�;���4�-�-�t�y�y�9����J��
�
���+�+�B����B�O���M�M�"�%�E���<�<��!�[�[��_�C�J�J�r�N��[�[� �!%���R���
�
�2���"�)�)�%�0�����)�)�+�I�C���S�b���.���#�#�E�*�A��:�:�<�<�!"�	�	�#��,��|�|�~�~��C�J��
r(c��[5erP)�FastdeltaUnavailable)rLr�r�s   r8r��treemanifest.fastdeltaBs
��#�$�$r(c�V^^^	^
�U(aGUR5(d2TRU5nURU5nURUTS9$0m
[TR5m	UU	U
U4Sjn/nU"TX5 U(a$UR5upxU"XxU5 U(aM$T
$)r[r\c�P>�URUR:Xa#UR(dUR(dgUR5 UR5 TRX5 URR5H3up4URR
UT5nURXE45 M5 URR5H)up5X0R;dMURTU45 M+ URR5H�upgURR
US5nURR
US5n	URR
US5n
Xy:wdX�:waXx4X�44T
URU5'M}T(dM�ST
URU5'M� URR5HIupiX`R;dMURR
US5n
SX�44T
URU5'MK g)z]compares two tree manifests and append new tree-manifests which
needs to be compared to stackNr(r�)r�r�r�r�r6rvrgr<r�r�r�)r�r��stackr�r]r�r��n1�fl1�n2�fl2r��	emptytree�resultrLs           ����r8�_iterativediff�)treemanifest.diff.<locals>._iterativediffgs�����x�x�2�8�8�#�B�I�I�b�i�i���H�H�J��H�H�J����r�&������)����X�X�\�\�!�Y�/�����b�X�&�*������)����H�H�$��L�L�)�R��1�*��)�)�/�/�+����i�i�m�m�B��,���Y�Y�]�]�2�t�,���i�i�m�m�B��,���8�s�z�02�y�2�)�.D�F�2�;�;�r�?�+��U�.2�F�2�;�;�r�?�+�,��)�)�/�/�+����Y�Y�&��)�)�-�-��C�0�C�/:�R�I�.F�F�2�;�;�r�?�+�,r()rMrXr�r�r��pop)rLr�rr�r]rh�stacklsr�r�rfrgs`  `     @@r8r��treemanifest.diffGs����2���������u�%�B����U�#�B��7�7�2�U�7�+�+��� ��!3�!3�4�	�	G�	G�>���t�R�)���[�[�]�F�B��2�7�+��g��
r(c��UR(+=(a1 UR(+=(a URUR:H$rPr
)rLr�s  r8�unmodifiedsince�treemanifest.unmodifiedsince�s+���;�;��K�r�y�y�=�K�T�Z�Z�2�8�8�5K�Kr(c��URn[URU5HdupEnUS:Xa
US-nXRS4X4'MSU;a XPU'U(aURXF5 M=M?XPRU'U(dMVX`R
U'Mf g)Nr�r�F)r�r9rxrbr�r�)rLr�r��selflazyr4r5rBs       r8r��treemanifest.parse�s���
�>�>���t�}�}�d�3�H�A�"��T�z���H�� !�u�5������
�Q����L�L��'��
"#���A���2�%'�K�K��N�'4r(c�T�UR5 [UR55$)z3Get the full data of this manifest as a bytestring.)r�rCr�rRs r8r��treemanifest.text�s���
�
���T�%�%�'�(�(r(c���UR5 URnURR5VVs/sHup#USSUSS4PM nnnURVs/sH!o"SSURUR
S4PM# nnURVs/sHofURUU"U54PM nn[[XW-U-55$s snnfs snfs snf)z�Get the full data of this directory as a bytestring. Make sure that
any submanifests have been written first, so their nodeids are correct.
Nr#rr�)	r�r7r�rvr6r�r�rCrO)rLr7r�r��lazydirsr5r4r@s        r8�dirtext�treemanifest.dirtext�s���	
�
�
���
�
��59�^�^�5I�5I�5K�L�5K�T�Q�Q�s��V�Q�q�T�4�(�5K��L�=A�Z�Z�H�Z��3�B�����A��,�,�d�3�Z��H�8<���D��1�T�[�[��^�U�1�X�.���D��V�D�L�8�3�4�5�5��M��H��Ds�C�"(C�!C!c�"^^�UU4SjnX0lg)Nc�B>�URT"5T5 SUlgr)r�r�)r��gettextr�s ��r8�_load_for_read�)treemanifest.read.<locals>._load_for_read�s���
�G�G�G�I�{�+��A�Hr()r�)rLr{r�r|s `` r8�read�treemanifest.read�s���
	�(�r(c��^�UR5 UR5 UR5 [UR5mU4SjnURURSS5nURU5nUS:XdUS:XaSnURR5HKupxU(aUSSU;aMU"X5n	U"X'5n
X�RR:XaX�p�U"X�X�5 MM g)Nc�>�URRU5nU(aUS$URRUT5nUceUR$rH)r�rgr6r�)rWr��ld�treerfs    �r8�getnode�+treemanifest.writesubtrees.<locals>.getnode�sK���������#�B���!�u���7�7�;�;�q�)�,�D��#�#�#��:�:�r(r#r�r�)	r�r�r�rSr�r�r6rvr�)rLr]r��writesubtreerr�r�r�r��subp1�subp2rfs           @r8�
writesubtrees�treemanifest.writesubtrees�s����	
�
�
��
���
�
���
� ��!3�!3�4�	�	��&�&�t�y�y��"�~�6���)�)�%�0���G��u����E��z�z�'�'�)�G�A���3�B��u�,���B�N�E��B�N�E��*�*�1�1�1�$�u���e�3�*r(c#�d# �U(a$URURSS5(dgU(aU"URSS5(aUv� UR5 UR5 URR5Hup#UR
US9Shv�N M gN	7f)z�Returns an iterator of the subtrees of this manifest, including this
manifest itself.

If `matcher` is provided, it only returns subtrees that match.
Nr#)�matcher)�visitdirr�r�r�r6rv�walksubtrees)rLr�r�r�s    r8r��treemanifest.walksubtrees�s�����7�+�+�D�I�I�c�r�N�;�;���'�$�)�)�C�R�.�1�1��J��
�
�������z�z�'�'�)�G�A��(�(��(�9�9�9�*�9�s�B"B0�$B.�%
B0)r�r�r6r�r�r�r�r�r�rxr�)r(r()r>r\r�r\)r)r\rdr\r�)r�r\rdre)r�zUnion[Set[bytes], bytes]rdzOptional[Set[bytes]])r�r�r�r�r�r�rg)rr\rdre)rdz9Iterator[Tuple[bytes, Union[bytes, treemanifest], bytes]])rdz2Iterator[Tuple[bytes, Union[bytes, treemanifest]]]r�r�)r4r\rdr�rP)r4r\rfr�rdr�)r4r\rdr\�r4r\rdr�)r4r\rdre)r4r\rr\r7r\rdre)r4r\r5r\rdre)r4r\r7r\rdre�rdr�)r�r�rr�rdr�r�r�r�)rrrdr�)r�r r�r�rdztuple[ByteString, ByteString]r)r�r�rr�r�r�rdr�)r�r�rdr�)r�r\r��&Callable[[bytes, bytes], treemanifest]rdrer�)r{zCallable[[], ByteString]r�r�rdre)
r]r�r�r�r�zHCallable[[Callable[[treemanifest], None], bytes, bytes, MatcherT], None]rrrdre)r�r�rdzIterator[treemanifest])9rirjrkrl�__annotations__rMr�r�r�r�r�r�rr�r�r�	strmethodrr>rrr�rvr|r�r#rSr�rgr�r7r]r�rr�r�rbr�r1r�rGr5r?r/rPrXrWr�r�rnr�r�rwr~r�r�rnrQr(r8r�r�Us?��
�K�$�$��L������4 ��"��-��	�� �,�#��H�P����

��

��
��+�	B�+�	%��I�)�%��
$�
/�"�+�;�� �(�&��"�4=A����'9��	��>�#��#��	D�$�2:�$*�'�R%��%�)E�%�	&�%�%)��	E��E�"�E��	E�

�E�NL�(��(�<�(�
�	(�6)�
	6�	(�)�	(�<�	(�
�		(�(4��(4�
�(4�
�	(4��(4�
�(4�V-1�:�)�:�	�:�:r(r�c�^�\rSrSrSrSrU4SjrU4SjrSrU4Sjr	U4Sjr
U4S	jrU4S
jrU4Sjr
U4SjrSU4S
jjrSU4SjjrSrU=r$)�manifestfulltextcacheiz�File-backed LRU cache for the manifest cache

File consists of entries, up to EOF:

- 20 bytes node, 4 bytes length, <length> manifest data

These are written in reverse cache order (oldest to newest).

smanifestfulltextcachec�N>�[TU]U5 SUlSUlSUlgr)�superrMr��_read�_opener)rL�max�	__class__s  �r8rM�manifestfulltextcache.__init__s%���
����������
���r(c�6>�UR(d
URcgURUR5n[TU]nURS5n[
U5S:aO^[R"SURS55Sn[URU55n[
U5U:waO
U"X55 MSSS5 SUlSUlg![Ra M.f=f!,(df   N8=f![a NGf=f)NTr��>L�rF)
r�r��_filer�r�r~r.r��unpackrr��OSErrorr�)rL�fprrr�r�r�s      �r8r~�manifestfulltextcache.reads�����:�:����-��	����d�j�j�)�R��g�)����7�7�2�;�D��4�y�2�~���%�}�}�U�B�G�G�A�J�?��B��&�b�g�g�d�m�4�E��5�z�T�)����$��*�(��
�����"�<�<�����*�)�� �	��	�sR�D�-C:�+)C�4C:�D�C7�3C:�6C7�7C:�:
D�D�D�
D�Dc	�J�UR(a
URcgURURSSSS9nURRnUR
UR;aoURUR
5 UR[R"S[UR555 URUR5 X RLaOURnM�SSS5 g!,(df   g=f![a gf=f)N�wT)�
atomictemp�
checkambigr�)
r�r�r��_headr2r��_cache�writer�r�r.r�r�)rLr�rs   r8r��manifestfulltextcache.write4s����{�{�d�l�l�2��	�����
�
�D�T�d�����z�z������x�x�4�;�;�.�������*�������U�C��
�
�O�!D�E�������,��z�z�)���9�9�D��	�����		�
�		�s/�D�B>D�;D�
D�D�D�
D"�!D"c�b>�UR(dUR5 [TU]
5$rP)r�r~r�r��rLr�s �r8r��manifestfulltextcache.__len__Ps ����z�z��I�I�K��w�� � r(c�d>�UR(dUR5 [TU]
U5$rP)r�r~r�r��rLr�r�s  �r8r��"manifestfulltextcache.__contains__Us#����z�z��I�I�K��w�#�A�&�&r(c�b>�UR(dUR5 [TU]
5$rP)r�r~r�rSr�s �r8rS�manifestfulltextcache.__iter__Zs!����z�z��I�I�K��w��!�!r(c��>�UR(dUR5 URRU5URLn[
TU]U5nU(aSUlU$r-)r�r~r�rgr�r�r�r�)rLr��setdirtyr�r�s    �r8r��!manifestfulltextcache.__getitem___sL����z�z��I�I�K��;�;�?�?�1�%�T�Z�Z�7����#�A�&����D�K��r(c�t>�UR(dUR5 [TU]
X5 SUlgr-)r�r~r�r�r�)rLr�r�r�s   �r8r��!manifestfulltextcache.__setitem__is'����z�z��I�I�K�
���A�!���r(c�t>�UR(dUR5 [TU]
U5 SUlgr-)r�r~r�r�r�r�s  �r8r��!manifestfulltextcache.__delitem__os'����z�z��I�I�K�
���A����r(c�`>�UR(dUR5 [TU]
XS9$)N)rf)r�r~r�rg)rLr�rfr�s   �r8rg�manifestfulltextcache.getus$����z�z��I�I�K��w�{�1�{�.�.r(c�l>�[TU]5 U(aSUlUR5 SUlg)NTF)r�r�r�r�r�)rL�clear_persisted_datar�s  �r8r��manifestfulltextcache.clearzs&���
��
����D�K��J�J�L���
r()r�r�r�rPr�)rirjrkrlr�r�rMr~r�r�r�rSr�r�r�rgr�rn�
__classcell__�r�s@r8r�r�sK����
%�E���8�8!�
'�
"�
���/�
�r(r��c��\rSrSrSrSrg)r]i�z;Exception raised when fastdelta isn't usable on a manifest.rQN)rirjrkrlr�rnrQr(r8r]r]�s��Er(r]c�n�\rSrSrSrS&SjrSrSr\S5r	S'S(S	jjr
S
rS)S*SjjrSr
S
rSrSrSrSrSrSrSrSrSrSrSrSrSrSSS\R:SS4SjrS+SjrSr Sr!Sr"S r#S!r$S,S"jr%\S#5r&\&RNS$5r&S%r(g)-�manifestrevlogi�zfA revlog that stores manifest texts. This is responsible for caching the
full-text manifest contents.
NFc
�X�XlSnSnSn[USS5n	U	b6U	RSU5nU	RSS5nU	RSS5nU=(d UUl[	U5UlU(aUR(dUSU	-45eS	n
U(aS
U-U
-n
X0lU(aX@lO	SU0Ul[R"U[RUR4U
[U5(+S[US
9Ul
URRUlg)a�Constructs a new manifest revlog

`indexfile` - used by extensions to have two manifests at once, like
when transitioning between flatmanifeset and treemanifests.

`treemanifest` - used to indicate this is a tree manifest revlog. Opener
options can also be used to make this a tree manifest revlog. The opener
option takes precedence, so if it is set to True, we ignore whatever
value is passed in to the constructor.
r�F�optionsN�manifestcachesize�treemanifestspersistent-nodemaps
opts is %rs
00manifestsmeta/r(T)�target�radixr��mmaplargeindex�upperboundcomp�persistentnodemap)r��getattrrg�_treeondiskr��_fulltextcacher��_dirlogcacher�revlog_constants�KIND_MANIFESTLOGr��MAXCOMPRESSION�_revlogr�)rLr��openerr��dirlogcacher��	cachesize�optiontreemanifestr��optsr�s           r8rM�manifestrevlog.__init__�s��$+���	�"��!���v�y�$�/�������!5�y�A�I�!%���/�5�!A�� $���)>�� F��-�=����3�I�>�����#�#�A�d�M�D�,@�%A�A�#�����t�O�e�+�E��	�� +��!$�d��D���}�}��$�5�5�t�y�y�A����:�~��)�/�	
����\�\�'�'��
r(c��UR$)z�return an actual revlog instance if any

This exist because a lot of code leverage the fact the underlying
storage is a revlog for optimization, so giving simple way to access
the revlog instance helps such code.
)r�rRs r8�
get_revlog�manifestrevlog.get_revlog�s���|�|�r(c�$^^�[US5(dgURURlUR	UR
5cg[R"U5m[R"U5mUU4SjnURU5 g)z1Persist the manifestfulltextcache on lock release�	_wlockrefNc�>�U(dgT"5nT"5nUbUcgURRS5ULagURR5 gr�)�manifestlog�
getstorager�r�)�success�reporL�manifestrevlogref�reporefs   ��r8�persistmanifestcache�Emanifestrevlog._setupmanifestcachehooks.<locals>.persistmanifestcache�sR������9�D�$�&�D��|�t�|�����*�*�3�/�t�;�����%�%�'r()	�hasattr�	wcachevfsr�r��_currentlockr��weakref�ref�
_afterlock)rLr�r�r�r�s   @@r8�_setupmanifestcachehooks�'manifestrevlog._setupmanifestcachehooks�sn����t�[�)�)��&*�n�n����#����T�^�^�,�4���+�+�d�#��#�K�K��-��	(�	
���,�-r(c��UR$rP)r�rRs r8�
fulltextcache�manifestrevlog.fulltextcache�s���"�"�"r(c��URR5 URRUS9 URU0Ulg�N)r�)r��clearcachesr�r�r�r��rLr�s  r8r��manifestrevlog.clearcaches�s;����� � �"����!�!�7K�!�L�!�Y�Y��-��r(c��U(aUR(deXR;aC[URURUURURS9nX RU'URU$)N)r�)r�r�r�r�r�)rLr��mfrevlogs   r8�dirlog�manifestrevlog.dirlog�sp����#�#�#�#��%�%�%�%��"�"������!�!�!�-�-��H�$,���a� �� � ��#�#r(c
���X@R;a
[5e[U5 [R"[U5V
s/sHo�S4PM sn
[U5V
s/sHo�S4PM sn
5nUR
URUU5up�URRU5U
4n[R"U5nURRX�X4X^5nURRU5nUbX�RU'U$s sn
fs sn
f![a� UR(aYU(dS5eU	(dS5eU"URU5nU"URU5nURXUUUX�S9nSnN�UR!5nURRX�X4U5nURRU5n[#U5nN�f=f)a�add some manifest entry in to the manifest log

input:

  m:           the manifest dict we want to store
  transaction: the open transaction
  p1:          manifest-node of p1
  p2:          manifest-node of p2
  added:       file added/changed compared to parent
  removed:     file removed compared to parent

tree manifest input:

  readtree:    a function to read a subtree
  match:       a filematcher for the subpart of the tree manifest
FTs,readtree must be set for treemanifest writess/match must be specified for treemanifest writes�rN)r�r]r=�heapq�mergerOr�r��revrr��addrevisionrr�r��_addtreer�r�)rLrW�transaction�link�p1�p2�added�removed�readtreerrq�workr�r��
cachedeltar�rr5r]r�s                    r8rB�manifestrevlog.adds���8)	,��+�+�+�*�,�,�
�E�"��;�;�%+�E�]�3�]��U��]�3�$*�7�O�4�O�q�T��O�4��D�
$%�;�;�t�/A�/A�"�/E�t�#L� �I����)�)�"�-�y�8�J��;�;�y�)�D��,�,�*�*��4�R��C����!�!�#�&�A�,� �$-���q�!����G4��4��$�	,�����P�!P�P�x��P�P�P�u��d�i�i��,���d�i�i��,���M�M��D�"�b�(�"���!�	��v�v�x���l�l�.�.�t�$�B�O���L�L�%�%�c�*��%�d�O�	�'	,�s9�AD�
D�D�
D
�,BD�
D�A2G&�AG&�%G&c�^^^^�TRS:wa<URU5(dURU5(aUR5$UUUU4SjnURXEX�5 UR	5n	Sn
TRS:waGX�R	5:XaUR5n
O#X�R	5:XaUR5n
U
(dVTR
R
U	TTUR5UR55nTR
RU5n
URU
5 U
$)Nr(c�r>�TRUR55nURUTTUUSSTUS9	 g)N�rr)r�r>rB)	r�r�r�r�sublogr	rrLrs	     ����r8r��-manifestrevlog._addtree.<locals>.writesubtree_sC����[�[�����,�F��J�J��������!��
�

r()r�rnrr�rwr�rr)rLrWrr	r]r�rrr�r�r5rs` ``  `     r8r�manifestrevlog._addtreeWs�����9�9���
���b�!�!�Q�%6�%6�r�%:�%:��6�6�8�O�	�	�	
�����4��y�y�{�����9�9����z�z�|�#��G�G�I������%��G�G�I����,�,�*�*��k�4�����B�G�G�I��C����!�!�#�&�A�	
�	�	�!���r(c�,�[UR5$rP)r.r�rRs r8r��manifestrevlog.__len__�s���4�<�<� � r(c�6�URR5$rP)r�rSrRs r8rS�manifestrevlog.__iter__�s���|�|�$�$�&�&r(c�8�URRU5$rP)r�rrs  r8r�manifestrevlog.rev�s���|�|����%�%r(c�8�URRU5$rP)r�r�rLrs  r8r�manifestrevlog.node�s���|�|� � ��%�%r(c�8�URRU5$rP)r��lookup�rLr�s  r8r"�manifestrevlog.lookup�s���|�|�"�"�5�)�)r(c�8�URRU5$rP)r��
parentrevsrs  r8r&�manifestrevlog.parentrevs�s���|�|�&�&�s�+�+r(c�8�URRU5$rP)r��parentsrs  r8r)�manifestrevlog.parents�����|�|�#�#�D�)�)r(c�8�URRU5$rP)r��linkrevrs  r8r-�manifestrevlog.linkrev�����|�|�#�#�C�(�(r(c�6�URR5$rP)r��	checksizerRs r8r1�manifestrevlog.checksize�s���|�|�%�%�'�'r(c�8�URRU5$rP)r��revisionrs  r8r4�manifestrevlog.revision�s���|�|�$�$�T�*�*r(c�8�URRU5$rP)r��rawdatars  r8r7�manifestrevlog.rawdata�r+r(c�8�URRX5$rP)r��revdiff)rL�rev1�rev2s   r8r:�manifestrevlog.revdiff�s���|�|�#�#�D�/�/r(c�8�URRX5$rP)r��cmp)rLrr�s   r8r?�manifestrevlog.cmp�s���|�|����+�+r(c�8�URRU5$rP)r��deltaparentrs  r8rB�manifestrevlog.deltaparent�s���|�|�'�'��,�,r(c
�@�URRUUUUUUUS9$)N)�
nodesorder�revisiondata�assumehaveparentrevisions�	deltamode�sidedata_helpers�
debug_info)r��
emitrevisions)rL�nodesrErFrGrHrIrJs        r8rK�manifestrevlog.emitrevisions�s5���|�|�)�)��!�%�&?��-�!�*�
�	
r(c	�B�URRUUUUUUUUS9$)N)�alwayscache�
addrevisioncb�duplicaterevisioncbrJ�delta_base_reuse_policy)r��addgroup)	rL�deltas�
linkmapperrrOrPrQrJrRs	         r8rS�manifestrevlog.addgroup�s8���|�|�$�$����#�'� 3�!�$;�%�	
�		
r(c�8�URRU5$rP)r��rawsizers  r8rX�manifestrevlog.rawsize�r/r(c�8�URRU5$rP)r��
getstrippoint)rL�minlinks  r8r[�manifestrevlog.getstrippoint�s���|�|�)�)�'�2�2r(c�8�URRX5$rP)r��strip)rLr\rs   r8r_�manifestrevlog.strip�s���|�|�!�!�'�7�7r(c�6�URR5$rP)r�r@rRs r8r@�manifestrevlog.files�s���|�|�!�!�#�#r(c��[U[5(d[R"S5eURR
"XR40UD6$)Ns"expected manifestrevlog to clone())rZr�r�ProgrammingErrorr��clone)rL�tr�
destrevlog�kwargss    r8re�manifestrevlog.clone�sA���*�n�5�5��(�(�)N�O�O��|�|�!�!�"�&8�&8�C�F�C�Cr(c�<�URRUUUUUS9$)N)�exclusivefiles�sharedfiles�revisionscount�trackedsize�
storedsize)r��storageinfo)rLrkrlrmrnros      r8rp�manifestrevlog.storageinfo�s/���|�|�'�'�)�#�)�#�!�(�
�	
r(c�.�URR$rP�r�r�rRs r8r��manifestrevlog.opener�s���|�|�"�"�"r(c�$�XRlgrPrsr#s  r8r�rt�s��#���r()r�r�r�r�r�r�r�)r(NFr��r�r�rdre)NN)r�Iterable[bytes]r
rw)FNNNN)FFFFF))rirjrkrlr�rMr�r��propertyr�r�r�rBrr�rSrrr"r&r)r-r1r4r7r:r?rBr�CG_DELTAMODE_STDrKrSrXr[r_r@rerpr��setterrnrQr(r8r�r��sB������
=(�~�.�8�#��#�.�
$�.��J��J�!�J�X(�T!�'�&�&�*�,�*�)�(�+�*�0�,�-���"'��-�-���
�2�� �� $�
�,)�3�8�$�D������

� �#��#��]�]�$��$r(r�)�manifestctx�treemanifestctxc�z�\rSrSrSrSrSr\S5rS
SSjjr	Sr
SSSjjrSS	jrSS
jr
Srg)r�ia�A collection class representing the collection of manifest snapshots
referenced by commits in the repository.

In this situation, 'manifest' refers to the abstract concept of a snapshot
of the list of files in the given commit. Consumers of the output of this
class do not care about the implementation details of the actual manifests
they receive (i.e. tree or flat or lazily loaded, etc).c�P�URUlSnSn[USS5nUb$URSU5nURSU5nXPlX0lURRU5 X@l0Ul[R"U5URS'X`l
g)NFr�r�r�r�r()r�r�rg�_treemanifests�
_rootstorer��_narrowmatch�_dirmancacher�lrucachedict�
_cachesize)rLr�r��	rootstore�narrowmatch�usetreemanifestr�r�s        r8rM�manifestlog.__init__s���!�/�/������	��v�y�$�/����"�h�h���H�O����!5�y�A�I�-��#�����0�0��6�'�����!%�!2�!2�9�!=����#��#�r(c�&�URSU5$)zWRetrieves the manifest instance for the given node. Throws a
LookupError if not found.
r()rgrs  r8r��manifestlog.__getitem__%s���x�x��T�"�"r(c�j�URSL=(d URR5(+$rP)r�rMrRs r8�narrowed�manifestlog.narrowed+s*���%�%��-�K��1B�1B�1I�1I�1K�L�Lr(c�z�X RRUS5;aURUU$URR5(d9URR	USS5(d[URX5$U(aqURR(a4U(a URU5RU5 [XU5nOn[R"[S5U-5eU(aURRU5 UR(a[USU5nO[!X5nX RR":waTURRU5nU(d.[$R&"UR(5nXPRU'XEU'U$)z�Retrieves the manifest instance for the given node. Throws a
LookupError if not found.

`verify` - if True an exception will be thrown if the node is not in
           the revlog
rQNr#s9cannot ask for manifest directory '%s' in a flat manifestr()r�rgr�rMr��excludeddirmanifestctxr�r�r�r�rr|r�Abortrrr{r�rr�r�)rLr�r�verifyrW�mancaches      r8rg�manifestlog.get/si���$�$�(�(��r�2�2��$�$�T�*�4�0�0�� � �'�'�)�)��$�$�-�-�d�3�B�i�8�8�-�d�.@�.@�$�M�M�����*�*���O�O�D�)�-�-�d�3�#�D��5���k�k��$���	�������#�#�D�)��"�"�#�D�#�t�4����+���%�%�,�,�,��(�(�,�,�T�2�H���,�,�T�_�_�=��*2�!�!�$�'��T�N��r(c�8�URRU5$rP)r�r�)rLr�s  r8r��manifestlog.getstorage`s�����%�%�d�+�+r(c�j�URR5 URRUS9 gr�)r�r�r�r�r�s  r8r��manifestlog.clearcachescs*�������!����#�#�9M�#�Nr(c�8�URRU5$rP)r�rrs  r8r�manifestlog.revgs�����"�"�4�(�(r(c�H�URRRUS9$)N)r)r�r��
update_caches)rLrs  r8r��manifestlog.update_cachesjs �����&�&�4�4��4�M�Mr()r�r�r�r�rr�N)T)r�r\rr\r�r�rd�AnyManifestCtxr�rvr�r�)rirjrkrlr�rMr�rxr�rgr�r�rr�rnrQr(r8r�r�sh��?�$�,#��M��M�8<�/��/�!&�/�04�/�	�/�b,�O�)�Nr(r�c�N�\rSrSr%S\S'SrSSjrSSjrS
SjrSS	jr	S
r
g)�memmanifestctxinr�
_manifestdictc�X�Xl[URR5UlgrP)�_manifestlogrr�r0r�)rLr�s  r8rM�memmanifestctx.__init__qs!��'��)�+�*C�*C�*K�*K�L��r(c�8�URRS5$r��r�r�rRs r8�_storage�memmanifestctx._storageu���� � �+�+�C�0�0r(c�v�[UR5nUR5R5UlU$rP�r�r�r~r�r��rL�memmfs  r8r��memmanifestctx.copyx�.���t�0�0�1��"�i�i�k�.�.�0����r(c��UR$rP)r�rRs r8r~�memmanifestctx.read}����!�!�!r(Nc�^�UR5RURUUUUUUUS9$)Nr)r�rBr�)rLrr	r
rrr
rs        r8r��memmanifestctx.write�s>���}�}��"�"�����������#�	
�		
r()r�r��rdr��rdr�r�rP�rirjrkrlr�rMr�r�r~r�rnrQr(r8r�r�ns"����M�1��
"�

r(r�c���\rSrSr%SrS\S'SrSSjrSSjrSSjr	\
SS	j5rSS
jrSSSjjr
SSS
jjrSSS.SSjjjrSSS.S SjjrSS.SSjjrS!SjrSrg)"r{i�zpA class representing a single revision of a manifest, including its
contents, its parent revs, and its linkrev.
zOptional[manifestdict]�_datac�*�XlSUlX lgrP)r�r�r�)rLr�rs   r8rM�manifestctx.__init__�s��'����
��
r(c�8�URRS5$r�r�rRs r8r��manifestctx._storage�r�r(c��UR$rP�r�rRs r8r�manifestctx.node�r<r(c�v�[UR5nUR5R5UlU$rPr�r�s  r8r��manifestctx.copy�r�r(c�T�UR5RUR5$rP�r�r)r�rRs r8r)�manifestctx.parents�����}�}��&�&�t�z�z�2�2r(c�D�URGcURRnURUR:Xa&[UR5UlUR$UR5nURUR;a.[R"URUR5nO>URUR5n[U5nXBRUR'[URU5UlUR$rP)
r�r�r�r�r�rr0r�r�rr�r4r�)rL�nc�storer�r�s     r8r~�manifestctx.read�s����:�:���"�"�0�0�B��z�z�R�Y�Y�&�)�"�*�*�5��
��z�z���
�
����:�:��!4�!4�4�#�+�+�E�,?�,?��
�
�,K�L�D� �>�>�$�*�*�5�D� )�$��I�6?�'�'��
�
�3�)�"�*�*�d�;��
��z�z�r(Fc�"�[R"SSSS9 UR5nURUR5nURU5nU[:wa$XBRU5;aUR5$UR5$)z�Calls either readdelta or read, based on which would be less work.
readdelta is called if the delta is against the p1, and therefore can be
read quickly.

If `shallow` is True, nothing changes since this is a flat manifest.
sJ"readfast" is deprecated use "read_any_fast_delta" or "read_delta_parents"�6.9r)��
stacklevel)
r�nouideprecwarnr�rr�rBrr&�	readdeltar~�rL�shallowr�r�rBs     r8�readfast�manifestctx.readfast�s{��	
���Y���	
�
�
�
����I�I�d�j�j�!���'�'��*���'�!�k�5E�5E�a�5H�&H��>�>�#�#��y�y�{�r(c�.�[R"SSSS9 UR5nURUR5n[
R"URURU5U55n[URRU5$)z�Returns a manifest containing just the entries that are present
in this manifest, but not in its p1 manifest. This is efficient to read
if the revlog delta is already p1.

Changing the value of `shallow` has no effect on flat manifests.
sN"readfast" is deprecated use "read_any_fast_delta" or "read_delta_new_entries"r�r)r�)rr�r�rr�r�	patchtextr:rBrr�r0�rLr�r�r�r�s     r8r��manifestctx.readdelta�sw��	
���]���	
�
�
�
����I�I�d�j�j�!���O�O�E�M�M�%�*;�*;�A�*>��B�C���E�/�/�7�7��;�;r(N�r�c�V�UR5nURUR5nURU5nUcU4nU[:waLXQ;aG[
R"URXT55nU[URRU54$SUR54$)�+see `imanifestrevisionstored` documentationN)r�rr�rBrrr�r:rr�r0r~)rL�valid_basesr�r�r�rBr�s       r8�read_any_fast_delta�manifestctx.read_any_fast_delta�s����
�
����I�I�d�j�j�!���'�'��*����&�.�K��'�!�k�&@�����
�
�k� =�>�A���U�0�0�8�8�!�<��
��d�i�i�k�"�"r(T�r��exactc�h�UR5nURUR5nURU5nUR	U5Vs/sHof[
LdM
UPM nnU(dZXW;aU[R"URURU5U55n[URRU5$U(a[U5S:XaUR5$[U5S:XaJUSn[R"URXd55n[URRU5$Uup�[R"URX�55n[R"URX�55n[URRU5n[URRU5n[URR5n
UR5H$up�nX�;aM
UcMU
RX�U5 M& U
$s snf)�4see `interface.imanifestrevisionbase` documentationsrr)r�rr�rBr&rrr�r:rr�r0r.r~r�r)rLr�r�r�r�rBrr)r�r
r�d1�d2�mdr4�new_node�new_flags                 r8�read_delta_parents�manifestctx.read_delta_parents�s����
�
����I�I�d�j�j�!���'�'��*��#�.�.�q�1�F�1��g�5E�1�1��F���/�����
�
�e�.?�.?��.B�A� F�G�A��� 3� 3� ;� ;�Q�?�?��#�g�,�!�+��9�9�;��
��\�Q�
���
�A�����
�
�a� 3�4�A��� 3� 3� ;� ;�Q�?�?��F�B�������r�!5�6�B�������r�!5�6�B��e�1�1�9�9�2�>�B��e�1�1�9�9�2�>�B��e�1�1�9�9�:�B�)+���)9�%��X��;���'��F�F�1��1�	*:�
�I��-Gs�H/� H/c�X�URR(aURUSS9$UR5nUR	UR
5n[R"URURU5U55n[URRU5$)r�Tr�)
r�r�r�r�rr�rr�r:rBrr�r0r�s     r8�read_delta_new_entries�"manifestctx.read_delta_new_entries	s������%�%��*�*�7�$�*�G�G��
�
����I�I�d�j�j�!���O�O�E�M�M�%�*;�*;�A�*>��B�C���E�/�/�7�7��;�;r(c�@�UR5RU5$rP�r~r]r�s  r8r]�manifestctx.find)	����y�y�{����$�$r()r�r�r�r�rgr��rdr�r�r�)r�r�rdrrP)r��Optional[Collection[int]]r�r�rdz"Tuple[Optional[int], manifestdict])r�r�r�r�rdrr�)rirjrkrlr�r�rMr�rr�r�r)r~r�r�r�r�r�r]rnrQr(r8r{r{�s����"�!��1���
�3��3�� �&<�&26�#��	#�.�#��	#�

,�#�0��	 �� ��	 �

� �D9>�<�%r(r{c�R�\rSrSr%S\S'SSjrSSjrS
SjrSSjrSS	jr	S
r
g)�memtreemanifestctxi-	r��
_treemanifestc�P�XlX l[UR5UlgrP)r�r�r�r�r�)rLr�r>s   r8rM�memtreemanifestctx.__init__0	s ��'���	�)�+�*C�*C�D��r(c�8�URRS5$r�r�rRs r8r��memtreemanifestctx._storage5	r�r(c��[URURS9nURR	5UlU$�N�r>)r�r�r�r�r�r�s  r8r��memtreemanifestctx.copy8	s4��"�4�#4�#4�$�)�)�D��"�0�0�5�5�7����r(c��UR$rP)r�rRs r8r~�memtreemanifestctx.read=	r�r(Nc�n^�U4SjnTR5RTRUUUUUUUUS9	$)Nc�V>�TRRX5R5$rP�r�rgr~)r>rrLs  �r8r�*memtreemanifestctx.write.<locals>.readtreeA	s#����$�$�(�(��3�8�8�:�:r(r)r�rBr�)	rLrr	r
rrr
rrs	`        r8r��memtreemanifestctx.write@	sI���	;��}�}��"�"������������#�

�
	
r()r�r�r�r�r��rdr�r�rPr�rQr(r8r�r�-	s"����E�
1��
"�
r(r�c���\rSrSr%S\S'SrSSjrSSjrSSjrSSjr	\
SS	j5rSSSjjrSS
S
.S Sjjjr
S!SjrSSjrS
SS.S"SjjrS
S
.SSjjrSSSjjrS#SjrSrg)$r|iQ	zOptional[treemanifest]r�c�6�XlX lSUlX0lgrP)r�r�r�r�)rLr�r>rs    r8rM�treemanifestctx.__init__T	s��'���	���
��
r(c�<�URRnUR5(dMURURSS5(d*[URRUR5$URRUR5$r�)r�r�rMr�r��excludedmanifestrevlogr�r�)rLr�s  r8r��treemanifestctx._storageb	s|���'�'�4�4���!�!�#�#��'�'��	�	�#�2��7�7�-��%�%�3�3�T�Y�Y���� � �+�+�D�I�I�6�6r(c�^^�TRGc�TR5mTRTRRR
:Xa0[
TRR5TlTR$TR(at[
TRRTRS9nUU4SjnU4SjnURX#5 URTR5 UTlTR$TRTR;a.[R"TRTR5nO?TRTR5n[U5nUTRTR'[
TRRTRUS9TlTR$)Nr�c�:>�TRTR5$rP)r4r�)rLr�s��r8r{�%treemanifestctx.read.<locals>.gettextt	s��� �>�>�$�*�*�5�5r(c�T>�TRRXSS9R5$)NF)r�r)r>r�rLs  �r8r��)treemanifestctx.read.<locals>.readsubtreew	s*��� �,�,�0�0��5�0�I�N�N�P�Pr()r>r�)r�r�r�r�r�r�r�r�r�r~rr�rr�r4r�)rLrWr{r�r�r�r�s`     @r8r~�treemanifestctx.readk	sN����:�:���M�M�O�E��z�z�T�.�.�<�<�C�C�C�)�$�*;�*;�*I�*I�J��
�6�z�z��3�"�"� ��!2�!2�!@�!@�d�i�i�P��6�Q�
���w�,��	�	�$�*�*�%���
��z�z���:�:��!4�!4�4�#�+�+�E�,?�,?��
�
�,K�L�D� �>�>�$�*�*�5�D� )�$��I�6?�E�'�'��
�
�3�)��%�%�3�3�������
��z�z�r(c��UR$rPr�rRs r8r�treemanifestctx.node�	r<r(c��[URURS9nUR5R	5UlU$r�)r�r�r�r~r�r�r�s  r8r��treemanifestctx.copy�	s4��"�4�#4�#4�$�)�)�D��"�i�i�k�.�.�0����r(c�T�UR5RUR5$rPr�rRs r8r)�treemanifestctx.parents�	r�r(Fc�8�[R"SSSS9 UR5nU(apURUR5n[
R"URURU5U55n[URRU5$URURUR55nURRURURU55R!5nUR!5n[#URRURS9nUR%U5R'5H4un	uup�up�U(dMX�U	'U
(dM#UR)X�5 M6 U$)r�sO"readdelta" is deprecated use "read_any_fast_delta" or "read_delta_new_entries"r�r)r�r�)rr�r�rr�rr�r:rBrr�r0r�rgr�rr~r�r�rvrb)rLr�r�r�r��r0�m0r]r�r4�n0�fl0rbrcs              r8r��treemanifestctx.readdelta�	s9�����^���	
�
�
�
�����	�	�$�*�*�%�A�����
�
�e�.?�.?��.B�A� F�G�A��� 3� 3� ;� ;�Q�?�?��"�"�5�9�9�T�Z�Z�#8�9�B��"�"�&�&�t�y�y�%�*�*�R�.�A�F�F�H�B�����B��d�/�/�=�=�4�9�9�M�B�-/�W�W�R�[�->�->�-@�)��)�I�R�y���2��q�E��s��
�
�1�*�	.A�
�Ir(Nr�c�d�UR5nURUR5nURU5nUcU4nU[:g=(a XQ;nU(aUU(aXPR54$UR
UR5nS[URRU54$U(aSURUS94$URU5Vs/sHnU[LdMX�;dMUPM n	nU	(a[U	5n
O[U5n
SURU
S94$s snf)r�N�r�)
r�rr�rBr�_read_storage_delta_shallowr4rr�r0�_read_storage_slow_deltar&r�)rLr�r�r�r�rB�
can_use_deltar�rr)�	best_bases           r8r��#treemanifestctx.read_any_fast_delta�	s,���
�
����I�I�d�j�j�!���'�'��*����&�.�K�#�w�.�M�;�3M�
���#�%E�%E�%G�H�H��N�N�4�:�:�.���l�5�+>�+>�+F�+F��J�K�K���d�;�;��;�M�N�N�#�-�-�a�0��0����'��,-�,<��0���
� #�G��I� #�K� 0�I��d�;�;��;�K�L�L��s�
D-�/D-�6D-c��UR5nURUR5n[R"URUR
U5U55n[URRU5$rP)
r�rr�rr�r:rBrr�r0)rLr�r�r�s    r8r�+treemanifestctx._read_storage_delta_shallow�	s\���
�
����I�I�d�j�j�!���O�O�E�M�M�%�*;�*;�A�*>��B�C���E�/�/�7�7��;�;r(c�$�UR5nUc*URURUR55nURRURURU55R5nUR5n[URRURS9nURU5R5H4unuupxup�U	(dMX�U'U
(dM#URXj5 M6 U$r�)r�rBrr�r�rgr�rr~r�r�r�rvrb)rLr�r�rr]r�r4rrrbrcs           r8r �(treemanifestctx._read_storage_slow_delta�	s����
�
����<��$�$�U�Y�Y�t�z�z�%:�;�D�
�
�
�
"�
"�4�9�9�e�j�j��.>�
?�
D�
D�
F��
�Y�Y�[��
�$�+�+�9�9�t�y�y�
I��)+�����):�):�)<�%�A�%�	��9�B��r��1���3��J�J�q�&�	*=�
�	r(Tr�c��UR5nURUR5nURU5Vs/sHoU[LdM
UPM nnU(dURXaS9S$[
U5S:XaRU(a;URUR5n[URRU5$UR5$[
U5S:Xa`USnU(aE[R"URXT55n[URRU5$URUS9$Uup�U(a�[R"URX�55n
[R"URX�55n[URRU
5n
[URRU5n[URR5nU
R!5H$up�nX�;aM
UcMUR#X�U5 M& U$UR$R'UR(UR+U55R5nUR$R'UR(UR+U	55R5nUR5nUR-U5n
UR-U5n[/UR$RUR(S9nU
R!5H$up�nX�;aM
UcMUR#X�U5 M& U$s snf)r�r�rrrr�)r�rr�r&rr�r.r4rr�r0r~rr�r:r r�rr�rgr�rr�r�)rLr�r�r�r�rr)r�r
rr�r�r�r4r�r�r]r��mcs                   r8r��"treemanifestctx.read_delta_parents�	s����
�
����I�I�d�j�j�!��#�.�.�q�1�F�1��g�5E�1�1��F���+�+�G�+�E�a�H�H�
��\�Q�
���N�N�4�:�:�.��#�E�$7�$7�$?�$?��C�C��y�y�{�"�
��\�Q�
���
�A���O�O�E�M�M�!�$7�8��#�E�$7�$7�$?�$?��C�C��4�4�!�4�<�<��F�B���_�_�U�]�]�2�%9�:���_�_�U�]�]�2�%9�:��!�%�"5�"5�"=�"=�r�B��!�%�"5�"5�"=�"=�r�B��!�%�"5�"5�"=�"=�>��-/�^�^�-=�)�A���{� ��+����q�H�5�	.>�
�	��&�&�*�*�4�9�9�e�j�j��n�E�J�J�L���&�&�*�*�4�9�9�e�j�j��n�E�J�J�L���Y�Y�[���W�W�R�[���W�W�R�[��!��%�%�3�3��	�	���.0�^�^�-=�)�A���{� ��+����q�H�5�	.>�
�	��[Gs�M�Mc��URR(aURUSS9$UR5nUR	UR
5nUR
U54nURXAS9S$)r�Tr�r�r)r�r�r�r�rr�rBr�)rLr�r�r��basess     r8r��&treemanifestctx.read_delta_new_entries+
sr�����%�%��*�*�7�$�*�G�G��
�
����I�I�d�j�j�!���"�"�1�%�'���'�'��'�?��B�Br(c��[R"SSSS9 UR5nURUR5nURU5nU[:wa#XBRU5;aURUS9$U(a9[URRURUR55$UR5$)z�Calls either readdelta or read, based on which would be less work.
readdelta is called if the delta is against the p1, and therefore can be
read quickly.

If `shallow` is True, it only returns the entries from this manifest,
and not any submanifests.
sK"readdelta" is deprecated use "read_any_fast_delta" or "read_delta_parents"r�r)r�r�)rr�r�rr�rBrr&r�rr�r0r4r~r�s     r8r��treemanifestctx.readfast<
s���	
���Z���	
�
�
�
����I�I�d�j�j�!���'�'��*���'�!�k�5E�5E�a�5H�&H��>�>�'�>�2�2����#�#�+�+�U�^�^�D�J�J�-G��
��9�9�;�r(c�@�UR5RU5$rPr�r�s  r8r]�treemanifestctx.findV
r�r()r�r�r�r�r�r�rgrr�r�)r�r�rd�AnyManifestDictrP)r�r�r�r�rdz%Tuple[Optional[int], AnyManifestDict]r�)r�r�r�r�rdr2r�)rirjrkrlr�rMr�r~rr�r�r)r�r�rr r�r�r�r]rnrQr(r8r|r|Q	s���!�!��7��B��
�3��3��626�,M��	,M�.�,M��	,M�

/�,M�\<��"��	6��6��	6�

�6�r"'�C��C�	�C�"�4%r(r|c�H^�\rSrSr%SrS\S'S\S'U4SjrSrSrU=r	$)	�excludeddiriZ
a�Stand-in for a directory that is excluded from the repository.

With narrowing active on a repository that uses treemanifests,
some of the directory revlogs will be excluded from the resulting
clone. This is a huge storage win for clients, but means we need
some sort of pseudo-manifest to surface to internals so we can
detect a merge conflict outside the narrowspec. That's what this
class is: it stands in for a directory whose node is known, but
whose contents are unknown.
r�r�r�c�j>�[TU]X5 X0lX0RS'SURS'g)Nr(r�)r�rMr�r�r�)rLr�r>rr�s    �r8rM�excludeddir.__init__i
s1���
����,��
� ���C������C�r(c��U$rPrQrRs r8r��excludeddir.copyv
rUr(r�)
rirjrkrlr�r�rMr�rnr�r�s@r8r4r4Z
s%���	�
���� ��r(r4c�8�\rSrSrSrSrSrS	S
SjjrSrSr	g)r�iz
zBcontext wrapper for excludeddir - see that docstring for rationalec�(�XlX lX0lgrP)r�r�r�)rLr�r>rs    r8rM�excludeddirmanifestctx.__init__}
s��*���	��
r(c�X�[URURUR5$rP)r4r�r�r�rRs r8r~�excludeddirmanifestctx.read�
s���4�-�-�t�y�y�$�*�*�E�Er(c�"�UR5$rP)r~)rLr�s  r8r��excludeddirmanifestctx.readfast�
s���y�y�{�r(c�H�[R"SUR-5e)Ns.attempt to write manifest from excluded dir %s�rrdr�)rL�argss  r8r��excludeddirmanifestctx.write�
s!���$�$�=��	�	�I�
�	
r()r�r�r�Nr�)r�r�)
rirjrkrlr�rMr~r�r�rnrQr(r8r�r�z
s��L��
F��
r(r�c�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)r	i�
aDStand-in for excluded treemanifest revlogs.

When narrowing is active on a treemanifest repository, we'll have
references to directories we can't see due to the revlog being
skipped. This class exists to conform to the manifestrevlog
interface for those directories and proactively prevent writes to
outside the narrowspec.
c��XlX lgrP)r�r�)rLr�r>s   r8rM�excludedmanifestrevlog.__init__�
s
��*���	r(c�H�[R"SUR-5e)Ns(attempt to get length of excluded dir %srArRs r8r��excludedmanifestrevlog.__len__�
�!���$�$�7�$�)�)�C�
�	
r(c�H�[R"SUR-5e)Ns'attempt to get rev from excluded dir %srArs  r8r�excludedmanifestrevlog.rev�
s!���$�$�6����B�
�	
r(c�H�[R"SUR-5e)Ns+attempt to get linkrev from excluded dir %srArs  r8r-�excludedmanifestrevlog.linkrev�
s!���$�$�:�T�Y�Y�F�
�	
r(c�H�[R"SUR-5e)Ns(attempt to get node from excluded dir %srArs  r8r�excludedmanifestrevlog.node�
rIr(c��grPrQ)rLrBrhs   r8rB�excludedmanifestrevlog.add�
s��	
r()r�r�N)rirjrkrlr�rMr�rr-rrBrnrQr(r8r	r	�
s%����
�

�

�

�

r(r	)r1r\)r1r\r�r�r�r�)rN)
rWr r�r\r�r�r�z
Optional[int]rdzTuple[int, int])r3rwrdre)r�r rqz Iterable[Tuple[int, int, bytes]]rdzTuple[bytes, ByteString]r�)W�
__future__rrrr��typingr�rrrrrr	r
rrr
r�i18nr�interfaces.typesrrrrr�rrrr-rrrrrr�
interfacesr�revlogutilsrr��
TYPE_CHECKINGr �	importmodr!r�r�r9rCrErpryr�r/rc�lazymanifestr��AttributeError�
imanifestdictrr�r=r�r�r�r�r�r�r��	Exceptionr]�imanifeststorager�r�r2�imanifestlogr��imanifestrevisionwritabler��imanifestrevisionstoredr{r�r|r4r�r	rQr(r8�<module>rcsh��#���
�
����������

�
�
���
����
�
�
�9�
%���"�"�
� $���6
���2$�$�N
��)��}�}�@
"��(�(�M�
u$�:�+�+�u$�r?C�(��(��(�!$�(�.;�(��(�V�!�
�!�'�!��!�2�	��m
:�:�+�+�m
:�`z�D�-�-�z�~��F�9�F�r$�Z�0�0�r$�l�7�8����l�2�3��eN�*�)�)�eN�P
�Z�9�9�
�>]%�*�4�4�]%�@!
��=�=�!
�HF%�j�8�8�F%�R�,��@
�_�
�*(
�^�(
��cD�"�!�M�"�s�H�H�H

Youez - 2016 - github.com/yon3zu
LinuXploit