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/pure/__pycache__/parsers.cpython-313.pyc
�

6�h̅���SSKJr SSKrSSKrSSKrSSKrSSKrSSKJrJ	r	 SSK
Jr \R(aSSKrSSK
JrJrJrJr SSKJr SSKJr \R(aSS	KJrJr \R0r\R4r\R8r\R<r\R@r!S
r"Sr#Sr$Sr%Sr&S
r'Sr(Sr)Sr*Sr+Sr,Sr-Sr.Sr/Sr0Sr1Sr2Sr3Sr4\Rj"SSS9"SS55r6S r7"S!S"5r8"S#S$\85r9"S%S&\95r:"S'S(\85r;\Rx4S2S)jjr=S*r>"S+S,\95r?"S-S.\?5r@S/rAS0rBS1rCg)3�)�annotationsN�)�nullrev�sha1nodeconstants)�attr)�error�pycompat�revlogutils�util)�nodemap)�	constants)�Any�
ByteString����������� �@��iiiii i@i�TF)�slots�initc�8�\rSrSrSr\R"5r\R"5r\R"5r	\R"5r
\R"5r\R"5r\R"5r
\R"5r\R"5r\R"5rS%Sjr\S5r\S5rSrSrS	rS
rSr\S5r\S
5r\S5rSr\S&Sj5r\S5r \S5r!\!RDS5r#\S5r$\S5r%\%RDS5r&\S5r'\S5r(\S5r)\S5r*\S5r+\S5r,\S5r-\S5r.Sr/S&S jr0S!r1S"r2S#r3S$r4g)'�DirstateItem�Pa�represent a dirstate entry

It hold multiple attributes

# about file tracking
- wc_tracked: is the file tracked by the working copy
- p1_tracked: is the file tracked in working copy first parent
- p2_info: the file has been involved in some merge operation. Either
           because it was actually merged, or because the p2 version was
           ahead, or because some rename moved it there. In either case
           `hg status` will want it displayed as modified.

# about the file state expected from p1 manifest:
- mode: the file mode in p1
- size: the file size in p1

These value can be set to None, which mean we don't have a meaningful value
to compare with. Either because we don't really care about them as there
`status` is known without having to look at the disk or because we don't
know these right now and a full comparison will be needed to find out if
the file is clean.

# about the file state on disk last time we saw it:
- mtime: the last known clean mtime for the file.

This value can be set to None if no cachable state exist. Either because we
do not care (see previous section) or because we could not cache something
yet.
Nc	��XlX lX0lXplX�lSUlSUlSUlSUlSUl	UcSnSnOUScSnU(aUSUlUSUlU(aUSuUlUlUl	gg)NFrrr)
�_wc_tracked�_p1_tracked�_p2_info�_fallback_exec�_fallback_symlink�_mode�_size�_mtime_s�	_mtime_ns�_mtime_second_ambiguous)	�self�
wc_tracked�
p1_tracked�p2_info�has_meaningful_data�has_meaningful_mtime�parentfiledata�
fallback_exec�fallback_symlinks	         �8/usr/lib/python3/dist-packages/mercurial/pure/parsers.py�__init__�DirstateItem.__init__{s���&��%���
�+��!1����
���
���
����',��$��!�#(� �"'��
�A�
�
&�#(� ��'��*�D�J�'��*�D�J��
�q�!�	
��
����,�	 �c�6�[U[-5n[U[-5nSnU[7-(aSnSnSnU[-(a	U[
-nSn	U[-(a	U[-n	U(a^[RS:XdeU[-(aSnOSnU[-(aU[R-nOU[R-nU[-n
U"[U[-5[U[ -5[U["-5UUXrX4U
44UU	S9$)z,Build a new DirstateItem object from V2 dataNFri�i�)r+r,r-r.r/r0r1r2)�bool�DIRSTATE_V2_HAS_MODE_AND_SIZE�DIRSTATE_V2_HAS_MTIME�&DIRSTATE_V2_EXPECTED_STATE_IS_MODIFIED�DIRSTATE_V2_HAS_FALLBACK_EXEC�DIRSTATE_V2_FALLBACK_EXEC� DIRSTATE_V2_HAS_FALLBACK_SYMLINK�DIRSTATE_V2_FALLBACK_SYMLINK�stat�S_IXUSR�DIRSTATE_V2_MODE_EXEC_PERM�DIRSTATE_V2_MODE_IS_SYMLINK�S_IFLNK�S_IFREG�"DIRSTATE_V2_MTIME_SECOND_AMBIGUOUS�DIRSTATE_V2_WDIR_TRACKED�DIRSTATE_V2_P1_TRACKED�DIRSTATE_V2_P2_INFO)�cls�flags�size�mtime_s�mtime_ns�
has_mode_sizer/�moder1r2�second_ambiguouss           r3�from_v2_data�DirstateItem.from_v2_data�s!���U�%B�B�C�
�#�E�,A�$A�B�����:�:�:�"�M�#(� ��
��0�0�!�$=�=�M����3�3�$�'C�C����<�<�5�(�(�(��1�1������2�2�����$������$�� �#E�E����E�$<�<�=��E�$:�:�;���!4�4�5� -�!5� ��<L�(M�N�'�-�	
�		
r6c	�j�US:XaU"SSSS9$US:XaU"SS9$US:Xa(U[:XaSnSnOU[:XaSnSnOSnSnU"XVS9$US	:XaDU[:XaU"SSS
9$U[:XaU"SSS9$U[:XaU"SSSX#S4S
9$U"SSX#USS44S9$[S[R
"U5-5e)z�Build a new DirstateItem object from V1 data

Since the dirstate-v1 format is frozen, the signature of this function
is not expected to change, unlike the __init__ one.
�mT)r+r,r-�a)r+�rF)r,r-�n)r+r-)r+r,)�*rF)r+r,r/r0r)r+r,r0zunknown state: %s)�	NONNORMAL�FROM_P2�AMBIGUOUS_TIME�RuntimeErrorr	�sysstr)rJ�staterPrL�mtimer,r-s       r3�from_v1_data�DirstateItem.from_v1_data�s���D�=��$�4��F�F�
�d�]��$�'�'�
�d�]��y� �!�
������"�
���!�
����*�>�>�
�d�]��w���d�D�9�9���"��d�t�<�<��.�(��#�#�).�$(��#?�	���#�#�$(���5�0A�#B����2�X�_�_�U�5K�K�L�Lr6c� �SUlSUlg)z�Mark a file as "possibly dirty"

This means the next status call will have to actually check its content
to make sure it is correct.
N)r'r(�r*s r3�set_possibly_dirty�DirstateItem.set_possibly_dirty�s����
���r6c�b�SUlSUlXlX lUuUlUlUlg)aImark a file as "clean" cancelling potential "possibly dirty call"

Note: this function is a descendant of `dirstate.normal` and is
currently expected to be call on "normal" entry only. There are not
reason for this to not change in the future as long as the ccode is
updated to preserve the proper state of the non-normal files.
TN)r r!r%r&r'r(r))r*rPrLr`s    r3�	set_clean�DirstateItem.set_cleans1�� �������
��
�FK�C��
�t�~�t�'Cr6c�.�SUlSUlSUlg)zemark a file as tracked in the working copy

This will ultimately be called by command like `hg add`.
TN)r r'r(rds r3�set_tracked�DirstateItem.set_trackeds��
 ���
��
���r6c�J�SUlSUlSUlSUlSUlg)zjmark a file as untracked in the working copy

This will ultimately be called by command like `hg remove`.
FN)r r%r&r'r(rds r3�
set_untracked�DirstateItem.set_untrackeds(��
!�����
���
���
���r6c�n�UR(a$SUlSUlSUlSUlSUlgg)z�remove all "merge-only" information from a DirstateItem

This is to be call by the dirstatemap code when the second parent is dropped
FN)r"r%r&r'r(rds r3�drop_merge_data�DirstateItem.drop_merge_data's3��
�=�=�!�D�M��D�J��D�J� �D�M�!�D�N�r6c�"�UR5$�N)�_v1_moderds r3rP�DirstateItem.mode3����}�}��r6c�"�UR5$rt)�_v1_sizerds r3rL�DirstateItem.size7rwr6c�"�UR5$rt)�	_v1_mtimerds r3r`�DirstateItem.mtime;s���~�~��r6c��URnUcgURnUupEnX$:wagUS:XdUS:XaUR(aggX5:H$)NFrT)r'r(r))r*�other_mtime�self_sec�self_ns�	other_sec�other_nsrQs       r3�mtime_likely_equal_to�"DirstateItem.mtime_likely_equal_to?s\���=�=������.�.��0;�-�	�-�� ��
��]�g��l��+�+����&�&r6c�F�UR(dgUR5$)a
States are:
  n  normal
  m  needs merging
  r  marked for removal
  a  marked for addition

XXX This "state" is a bit obscure and mostly a direct expression of the
dirstatev1 format. It would make sense to ultimately deprecate it in
favor of the more "semantic" attributes.
�?)�any_tracked�	_v1_staterds r3r_�DirstateItem.stateUs�������~�~��r6c��URSL$)aiTrue if "fallback" information are available for the "exec" bit

Fallback information can be stored in the dirstate to keep track of
filesystem attribute tracked by Mercurial when the underlying file
system or operating system does not support that property, (e.g.
Windows).

Not all version of the dirstate on-disk storage support preserving this
information.
N�r#rds r3�has_fallback_exec�DirstateItem.has_fallback_execfs���"�"�$�.�.r6c��UR$)z�"fallback" information for the executable bit

True if the file should be considered executable when we cannot get
this information from the files system. False if it should be
considered non-executable.

See has_fallback_exec for details.r�rds r3r1�DirstateItem.fallback_exects���"�"�"r6c�:�UcSUlg[U5Ulg)z�control "fallback" executable bit

Set to:
- True if the file should be considered executable,
- False if the file should be considered non-executable,
- None if we do not have valid fallback data.

See has_fallback_exec for details.N)r#r8�r*�values  r3�set_fallback_exec�DirstateItem.set_fallback_execs���=�"&�D��"&�u�+�D�r6c��URSL$)ahTrue if "fallback" information are available for symlink status

Fallback information can be stored in the dirstate to keep track of
filesystem attribute tracked by Mercurial when the underlying file
system or operating system does not support that property, (e.g.
Windows).

Not all version of the dirstate on-disk storage support preserving this
information.N�r$rds r3�has_fallback_symlink�!DirstateItem.has_fallback_symlink�s���%�%�T�1�1r6c��UR$)z�"fallback" information for symlink status

True if the file should be considered executable when we cannot get
this information from the files system. False if it should be
considered non-executable.

See has_fallback_exec for details.r�rds r3r2�DirstateItem.fallback_symlink�s���%�%�%r6c�:�UcSUlg[U5Ulg)z�control "fallback" symlink status

Set to:
- True if the file should be considered a symlink,
- False if the file should be considered not a symlink,
- None if we do not have valid fallback data.

See has_fallback_symlink for details.N)r$r8r�s  r3�set_fallback_symlink�!DirstateItem.set_fallback_symlink�s���=�%)�D�"�%)�%�[�D�"r6c��UR$)z/True is the file is tracked in the working copy)r rds r3�tracked�DirstateItem.tracked�������r6c�f�UR=(d UR=(d UR$)z4True is the file is tracked anywhere (wc or parents)�r r!r"rds r3r��DirstateItem.any_tracked�s$�����D�4�#3�#3�D�t�}�}�Dr6c�p�UR=(a$ UR=(d UR(+$)zTrue if the file has been addedr�rds r3�added�DirstateItem.added�s'�����K��)9�)9�)J�T�]�]�$K�Kr6c�f�UR=(a UR=(a UR$)z"True if the file has been modifiedr�rds r3�modified�DirstateItem.modified�s$�����F�D�$4�$4�F����Fr6c�p�UR(dgUR(dgUR(agg)z8True if the file has a chance to be in the "clean" stateFTr�rds r3�maybe_clean�DirstateItem.maybe_clean�s)�������!�!��
�]�]��r6c��UR$)z8True if the file is tracked in the first parent manifest)r!rds r3r,�DirstateItem.p1_tracked�r�r6c�@�UR=(a UR$)zfTrue if the file needed to merge or apply any input from p2

See the class documentation for details.
)r r"rds r3r-�DirstateItem.p2_info�s�����1�D�M�M�1r6c�p�UR(+=(a UR=(d UR$)z!True if the file has been removedr�rds r3�removed�DirstateItem.removed�s'���#�#�#�K��)9�)9�)J�T�]�]�Kr6c�6�SnUR(a	U[-nUR(a	U[-nUR(a	U[
-nURboURbbU[-nUR[R-(a	U[-n[R"UR5(a	U[-nURb	U[ -nUR"(a	U[$-nUR&b#U[(-nUR&(a	U[*-nUR,b#U[.-nUR,(a	U[0-nXR=(d SUR=(d SUR2=(d S4$)z7Returns (flags, mode, size, mtime) for v2 serializationr)r rGr!rHr"rIr%r&r9rPr@rArB�S_ISLNKrCr'r:r)rFr#r<r=r$r>r?r()r*rKs  r3�v2_data�DirstateItem.v2_data�s@��������-�-�E�����+�+�E��=�=��(�(�E��:�:�!�d�j�j�&<��2�2�E��y�y�4�<�<�'��3�3���|�|�D�I�I�&�&��4�4���=�=�$��*�*�E��'�'��7�7�E����*��2�2�E��"�"��2�2���!�!�-��5�5�E��%�%��5�5��
�z�z��Q��
�
�(:��D�N�N�<O�a�P�Pr6c���UR(d[S5eUR(agUR(aUR(agUR
(agg)z.return a "state" suitable for v1 serialization�untracked itemrWrUrVrX)r�r]r�r!r"r�rds r3r��DirstateItem._v1_state	sB������/�0�0�
�\�\��
�
�
�$�-�-��
�Z�Z��r6c�8�URbUR$S$)z-return a "mode" suitable for v1 serializationr)r%rds r3ru�DirstateItem._v1_modes��!�Z�Z�3�t�z�z�:��:r6c�j�UR(d[S5eUR(a(UR(aUR(a[
$UR(a[$UR(agUR(a[
$URc[
$UR$)z-return a "size" suitable for v1 serializationr�r)	r�r]r�r!r"rZr[r�r&rds r3ry�DirstateItem._v1_sizesq������/�0�0�
�\�\�d�.�.�4�=�=���
�]�]��N�
�\�\��
�Z�Z���
�Z�Z�
����:�:�r6c�&�UR(d[S5eUR(agURc[$UR
(a[$UR(d[$UR(a[$UR$)z.return a "mtime" suitable for v1 serializationr�r)r�r]r�r'r\r"r!r)rds r3r|�DirstateItem._v1_mtime/sh������/�0�0�
�\�\��
�]�]�
"�!�!�
�]�]�!�!��!�!�!�!�
�
)�
)�!�!��=�=� r6)
r#r$r%r(r'r)r!r"r&r )FFFTTNNN��return�bytes)5�__name__�
__module__�__qualname__�__firstlineno__�__doc__r�ibr r!r"r%r&r'r(r#r$r)r4�classmethodrRrarerhrkrnrq�propertyrPrLr`r�r_r�r1�setterr�r�r2r�r�r�r�r�r�r,r-r�r�r�ruryr|�__static_attributes__�r6r3rrPs{���<�'�'�)�K��'�'�)�K��w�w�y�H��G�G�I�E��G�G�I�E��w�w�y�H����	�I��W�W�Y�N����	��"�g�g�i����� �!����$"�L�)
��)
�V�(M��(M�T�L��	�
"���������� �� �'�,� �� � �/��/��#��#����.��.��
2��
2��&��&����1��1�� �� ��E��E��L��L��G��G������ �� ��2��2��L��L�!Q�F
�;��&!r6rc��[US-5$)Ni��)�int)�qs r3�gettyper�Cs���q�6�z�?�r6c
���\rSrSr%Sr\Rr\R"S5r
\R"S5rSSSSSSS\RSS\R\R\R4
rS\S'S\S	'S
\S'\R&S5r\R&S
5rSrSrSrSrSrS SjrSrSrSrS!SjrSr Sr!Sr"Sr#S"Sjr$S#S$Sjjr%Sr&g)%�BaseIndexObjectiGrs>Q�>irr�_datazlist[bytes]�_extrar��_lgtc�.�URR$rt)�index_formatrLrds r3�
entry_size�BaseIndexObject.entry_sizefs��� � �%�%�%r6c��[R"[R[05n[S[
U55HnXSnX!U'M U$)Nr�)�nodemaputil�NodeMapr�nullidr�range�len)r*r�r�ns    r3�_nodemap�BaseIndexObject._nodemapjsL���%�%�'8�'?�'?��&I�J���q�#�d�)�$�A����
�A��A�J�%��r6c��XR;$)z*return True if the node exist in the index�r��r*�nodes  r3�has_node�BaseIndexObject.has_noders���}�}�$�$r6c� �URU$)zIreturn a revision for a node

If the node is unknown, raise a RevlogErrorr�r�s  r3�rev�BaseIndexObject.revvs���}�}�T�"�"r6c�8�URRU5$)zAreturn a revision for a node

If the node is unknown, return None)r��getr�s  r3�get_rev�BaseIndexObject.get_rev|s���}�}� � ��&�&r6c��S[U5;a1[U[U55HnXSnURU	M gg�Nr�r�)�varsr�r�r�)r*�startr�r�s    r3�_stripnodes�BaseIndexObject._stripnodes�s?����d��#��5�#�d�)�,���G�A�J���M�M�!�$�-�$r6c�<�URRSS5 g)Nr�)�__dict__�poprds r3�clearcaches�BaseIndexObject.clearcaches�s���
�
���*�d�+r6c�F�UR[UR5-$rt)r�r�r�rds r3�__len__�BaseIndexObject.__len__�s���y�y�3�t�{�{�+�+�+r6c���S[U5;a[U5URUS'UR[U5U5nURRU5 gr�)r�r�r��_pack_entryr��append)r*�tup�datas   r3r�BaseIndexObject.append�sL����d��#�$'��I�D�M�M�#�a�&�!�����D�	�3�/�������4� r6c�f�USS:XdeUSS:XdeURR"USS6$)Nrr�	�r��pack�r*r��entrys   r3r�BaseIndexObject._pack_entry�s?���Q�x�1�}��}��Q�x�1�}��}�� � �%�%�u�R�a�y�1�1r6c��[U[5(d[S5eUS:dU[U5:�a[	U5eg)Nzexpecting int indexesr)�
isinstancer��	TypeErrorr��
IndexError�r*�is  r3�_check_index�BaseIndexObject._check_index�s;���!�S�!�!��3�4�4��q�5�A��T��N��Q�-��#r6c��[ert��NotImplementedErrorrs  r3�_calculate_index� BaseIndexObject._calculate_index�s
��"�!r6c��US:XaUR$URU5 XR:�aURXR-
nO,UR	U5nUR
X3UR-nURX5nUR(a2US:Xa,[R"S[US55nU4USS-nU$)Nrrr)�	null_itemrr�r�rr�r��
_unpack_entryr
�offset_typer�)r*rr	�indexr��offsets      r3�__getitem__�BaseIndexObject.__getitem__�s�����7��>�>�!����!���	�	�>��;�;�q�9�9�}�-�D��)�)�!�,�E��:�:�e�d�o�o�&=�>�D����q�'���9�9��a�� �,�,�Q���!��
�>�F��	�A�a�b�E�!�A��r6c��[5ertrrs  r3�__delitem__�BaseIndexObject.__delitem__�s��!�#�#r6c��URRU5nUSS[R[R[R4-nU$�Nr)r��unpack�revlog_constants�COMP_MODE_INLINE�RANK_UNKNOWN)r*r�r	r�s    r3r!�BaseIndexObject._unpack_entry�sO�����$�$�T�*��
�
�
��-�-��-�-��)�)�
�
���r6c�D�[RnURU5$)�!pack header information as binary)r-�INDEX_HEADERr)r*�header�v_fmts   r3�pack_header�BaseIndexObject.pack_header�s�� �-�-���z�z�&�!�!r6c��Xn[RR"USS6nUS:XaU[RRSnU$)�4return the raw binary string representing a revisionNrr)r-�INDEX_ENTRY_V1rr3rL)r*r�r�ps    r3�entry_binary�BaseIndexObject.entry_binary�sK���	���+�+�0�0�%���)�<���!�8��"�/�/�4�4�6�7�A��r6Nc�4^�[U5nUb[X25nU(d[/$S/US--n[U5nTbU4SjU5nUHnSXF'XnS=XGS'XGS'M [	U5VVs/sHuphU(dMUPM snn$s snnf)Nrrc3�6># �UHoT;dM
Uv� M g7frtr�)�.0r��
excluded_revss  �r3�	<genexpr>�+BaseIndexObject.headrevs.<locals>.<genexpr>�s����>�t�!�
�'=�A�A�t�s�	�	��)r��minrr��	enumerate)	r*rA�stop_rev�count�ishead�revsr��e�vals	 `       r3�headrevs�BaseIndexObject.headrevs�s�����D�	������(�E���9������	�"���U�|���$�>�t�>�D��A��F�I���A�*+�+�F�Q�4�L�6�A�$�<��!*�&� 1�9� 1�f�a�S�� 1�9�9��9s�9
B�
Br�)r�r��rr�r�r�r�)NN)r�z	list[int])'r�r�r�r��rust_ext_compatr-r:r��struct�calcsize�big_int_size�int_sizerr�r.r/r �__annotations__r�
propertycacher�r�r�r�r�r�rrrrrrr%r(r!r6r<rNr�r�r6r3r�r�Gs���O�#�2�2�L��?�?�5�)�L����u�%�H�	
�	�	�
�
�
�
�� � �	�	��)�)��)�)��%�%��I�"����

�I�	���&��&�
������%�#�'�%�,�,�!�2�
 �"�
�$�	�"�
�:�:r6r�c�2�\rSrSrSSSjjrS	SjrSrSrg)
�IndexObjecti�c��[U5UR-S:Xd3[U5UR[U5UR-45eXl[U5UR-Ul/Ulgr+)r�r�r�r�r�)r*r	�uses_generaldeltas   r3r4�IndexObject.__init__�si���4�y�4�?�?�*�a�/�	
���I��O�O���I����'�2
�	
�/�
�
���I����0��	���r6c��XR-$rt)r�rs  r3r�IndexObject._calculate_index�s���?�?�"�"r6c��[U[5(aURS:Xa
URb[	S5eUR
nUR
U5 URU5 XR:a.URSXR-Ul	Xl/UlgURSXR-
Ulg�Nrz.deleting slices only supports a:-1 with step 1)r�slice�stop�step�
ValueErrorr�rr�r�r�r�r�rs  r3r(�IndexObject.__delitem__�s����!�U�#�#�1�6�6�R�<�1�6�6�;M��M�N�N�
�G�G�����!��������y�y�=����$9�a�/�/�&9�:�D�J��I��D�K��+�+�o��I�I�
�6�D�Kr6)r�r�r�N)F)r	rrP)r�r�r�r�r4rr(r�r�r6r3rYrY�s���#�7r6rYc�J�\rSrSr%SrS\S'S\S'S\S'S	rS
rSrSr	g
)�PersistentNodeMapIndexObjecti�aa Debug oriented class to test persistent nodemap

We need a simple python object to test API and higher level behavior. See
the Rust implementation for  more serious usage. This should be used only
through the dedicated `devel.persistent-nodemap` config.
r�
_nm_docketz
int | None�_nm_max_idxznodemaputil.Block | None�_nm_rootc�.�[R"U5$)z�Return bytes containing a full serialization of a nodemap

The nodemap should be valid for the full set of revisions in the
index.)r��persistent_datards r3�nodemap_data_all�-PersistentNodeMapIndexObject.nodemap_data_alls��
�*�*�4�0�0r6c���URcgURn[R"XRURURR
5up#S=Ul=UlUlXU4$)z�Return bytes containing a incremental update to persistent nodemap

This containst the data for an append-only update of the data provided
in the last call to `update_nodemap_data`.
N)rjrhr��update_persistent_datari�tip_rev)r*�docket�changedr	s    r3�nodemap_data_incremental�5PersistentNodeMapIndexObject.nodemap_data_incrementalsk���=�=� ������#�:�:��-�-��!1�!1�4�?�?�3J�3J�
�
��>B�A��
�A��(�4�?���$�$r6c��UbQ[R"U5uUlUlUR(aXlgS=Ul=UlUlgg)z�provide full block of persisted binary data for a nodemap

The data are expected to come from disk. See `nodemap_data_all` for a
produceur of such data.N)r��
parse_datarjrirh)r*rr�nm_datas   r3�update_nodemap_data�0PersistentNodeMapIndexObject.update_nodemap_data"sK��
��.9�.D�.D�W�.M�+�D�M�4�+��}�}�"(��EI�I��
�I�� 0�4�?�r6)rhrirjN)
r�r�r�r�r�rVrmrtryr�r�r6r3rgrg�s*����O���&�&�1�%� 
Jr6rgc�4�\rSrSrSSjrSrSrS	SjrSrg)
�InlinedIndexObjecti/c��XlURS5UlURUR5 /Ulgrt)r��_inline_scanr�r�)r*r	�inliner[s    r3r4�InlinedIndexObject.__init__0s2���
��%�%�d�+��	����$�)�)�$���r6c���SnUbS/U-UlSnU[UR5UR-
::a�X R-n[
R"SURXDUR-5unUbX RU'US-
nX RU--
nU[UR5UR-
::aM�U[UR5:wa[S5eU$)Nrr�rzcorrupted data)	�_offsetsr�r�r�rTrRr,rUrd)r*�lgt�offrIr��ss      r3r~�InlinedIndexObject._inline_scan6s������?��C�#�I�D�M����S����_�t���6�6��+�+�+�E��=�=���
�
�5�4�=�=�#8�9��D�Q���'*�
�
�e�$��Q�J�E��?�?�Q�&�&�C��S����_�t���6�6��#�d�j�j�/�!��-�.�.��r6c�|�[U[5(aURS:Xa
URb[	S5eUR
nUR
U5 URU5 XR:a"URSUUl	Xl/Ul
gURSXR-
Ul
gr`)rrarbrcrdr�rr�r�r�r�rs  r3r(�InlinedIndexObject.__delitem__Is����!�U�#�#�1�6�6�R�<�1�6�6�;M��M�N�N�
�G�G�����!��������y�y�=� �M�M�"�1�-�D�M��I��D�K��+�+�o��I�I�
�6�D�Kr6c� �URU$rt)r�rs  r3r�#InlinedIndexObject._calculate_indexVs���}�}�Q��r6)r�r�r�r�N)rFrP)	r�r�r�r�r4r~r(rr�r�r6r3r|r|/s����&7� r6r|c���U[R:Xa[U5$U(d+U[R:Xa[nO[
nU"X5S4$[nU"XU5SU44$r+)r-�CHANGELOGV2�parse_index_cl_v2�REVLOGV2�IndexObject2rYr|)r	rr[�formatrJs     r3�parse_index2r�Zsf���!�-�-�-� ��&�&���%�.�.�.��C��C��4�+�T�1�1�
�C��t�.�/�!�T��:�:r6c��[U5S4$rt)�IndexChangelogV2)r	s r3r�r�ls���D�!�4�'�'r6c�J�\rSrSr\R
rSrSrSr	Sr
SrSrg)	r�ipc��US:a[eURU5 XR:a
Sn[U5e[X5nXGS'X'S'X7S'XWS'[	U5nURX5nX�RXR-
'g)z�
Replace an existing index entry's sidedata offset and length with new
ones.
This cannot be used outside of the context of sidedata rewriting,
inside the transaction that creates the revision `rev`.
rz2cannot rewrite entries outside of this transactionrr�N)�KeyErrorrr��list�tuplerr�)	r*r��sidedata_offset�sidedata_length�offset_flags�compression_mode�msgr�news	         r3�replace_sidedata_info�"IndexObject2.replace_sidedata_infoss�����7��N����#�����?�F�C��3�-�����O�E�#�!�H�&�!�H�&�!�H�(�"�I��%�L�E��"�"�3�.�C�+.�K�K��i�i��(r6c��URRU5nUSSnUSS-nUSS-S-	nX4U[R4-$)N�
��r)r�r,r-r/)r*r�r	r�	data_comp�
sidedata_comps      r3r!�IndexObject2._unpack_entry�sZ��� � �'�'��-���S�b�	����H�q�L�	��b��V�,��2�
��=�2B�2O�2O�P�P�Pr6c�t�USSnUSS-nUSS-S-nX4U-4-
nURR"U6$)Nr�r�r�rr
)r*r�rr	r�r�s      r3r�IndexObject2._pack_entry�sS���S�b�z���"�I��M�	��r��Q��1�,�
��]�*�,�,��� � �%�%�t�,�,r6c�,�XnURX5$)r9)rrs   r3r<�IndexObject2.entry_binary�s���	������+�+r6c�:�SnX!-n[R"U5e)r2z9version header should go in the docket, not the index: %d)r�ProgrammingError)r*r4r�s   r3r6�IndexObject2.pack_header�s��I���
���$�$�S�)�)r6r�N)
r�r�r�r�r-�INDEX_ENTRY_V2r�r�r!rr<r6r�r�r6r3r�r�ps'��#�2�2�L�/�<Q�-�,�
*r6r�c��\rSrSr\R
r\RS\RS-\R\RS-rSSjr
SrSrg)r�i�N)rc���URRU5nU[RU[RU[R
UUU[RU[RU[RU[RU[RU[RS-U[RS-	S-U[R4
$�Nr�r)
r�r,r-�INDEX_ENTRY_V2_IDX_OFFSET�$INDEX_ENTRY_V2_IDX_COMPRESSED_LENGTH�&INDEX_ENTRY_V2_IDX_UNCOMPRESSED_LENGTH�INDEX_ENTRY_V2_IDX_PARENT_1�INDEX_ENTRY_V2_IDX_PARENT_2�INDEX_ENTRY_V2_IDX_NODEID�"INDEX_ENTRY_V2_IDX_SIDEDATA_OFFSET�-INDEX_ENTRY_V2_IDX_SIDEDATA_COMPRESSED_LENGTH�#INDEX_ENTRY_V2_IDX_COMPRESSION_MODE�INDEX_ENTRY_V2_IDX_RANK)r*r�r	r��itemss     r3r!�IndexChangelogV2._unpack_entry�s����!�!�(�(��.���"�<�<�=��"�G�G�H��"�I�I�J����"�>�>�?��"�>�>�?��"�<�<�=��"�E�E�F�� �N�N�
�
�"�F�F�G�!�K�
�#�G�G�
H�A�
M��
��"�:�:�;�!
�	
r6c�Z�U[RnU[RnX1:XdX145eXA:XdXA45eU[RU[RU[R
U[RU[RU[RU[RU[RU[RS-U[RS-S--U[R4
nURR"U6$r�)r-�ENTRY_DELTA_BASE�ENTRY_LINK_REV�ENTRY_DATA_OFFSET�ENTRY_DATA_COMPRESSED_LENGTH�ENTRY_DATA_UNCOMPRESSED_LENGTH�ENTRY_PARENT_1�ENTRY_PARENT_2�
ENTRY_NODE_ID�ENTRY_SIDEDATA_OFFSET� ENTRY_SIDEDATA_COMPRESSED_LENGTH�ENTRY_DATA_COMPRESSION_MODE�ENTRY_SIDEDATA_COMPRESSION_MODE�
ENTRY_RANKr�r)r*r�r�base�link_revr	s      r3r�IndexChangelogV2._pack_entry�s$���%�6�6�7���)�8�8�9���{�'�T�K�'�{���/���/���"�4�4�5��"�?�?�@��"�A�A�B��"�1�1�2��"�1�1�2��"�0�0�1��"�8�8�9��"�C�C�D��"�>�>�?�!�C��%�E�E�F��J���
�
�"�-�-�.�

��� � �%�%�t�,�,r6r�)T)
r�r�r�r�r-�INDEX_ENTRY_CL_V2r�r�r r�r!rr�r�r6r3r�r��s\��#�5�5�L�	���<�!1�!<�!<�=�
�	�
�
 �
 �!1�!<�!<�!>�
?�	@��
�*-r6r�c��[X5S4$)zClike parse_index2, but always return a PersistentNodeMapIndexObjectN)rg)r	rr[s   r3�parse_index_devel_nodemapr��s��'��@�$�F�Fr6c� �USSUSS/nSn[R"U5nSn[U5nXg:aYXe-n[SX&U5n	X�S-nX(Un
SU
;aU
R	S5up�X�U
'[
R"U	SS6X
'Xg:aMYU$)N��(�>cllllr�)rRrSr��_unpack�splitrra)�dmap�copymap�st�parentsr��e_size�pos1�l�pos2rL�f�cs            r3�parse_dirstater��s����#�2�w��2�b�	�"�G�
�F�
�_�_�V�
$�F�
�D��B��A��(��}���I�r�t�}�-����d�{���D�M���A�:��7�7�5�>�D�A��A�J��+�+�Q�r��U�3����(��Nr6c��[5nURnU"SRU55 UR5HtupVXQ;a	SXQU4-n[	SUR5UR
5UR5UR5[U55nU"U5 U"U5 Mv UR5$)Nr6s%s%sr�)�stringio�write�joinr��_packr�ruryr|r��getvalue)r�r��pl�csr�r�rLs       r3�
pack_dirstater��s���	��B��H�H�E�	�#�(�(�2�,���
�
�����<��Q��
�O�+�A���
�K�K�M�
�J�J�L�
�J�J�L�
�K�K�M���F�

��	�a��
�a����;�;�=�r6)r	rr�zFtuple[IndexObject | InlinedIndexObject, tuple[int, ByteString] | None])D�
__future__r�ior@rR�typing�zlibr�rr�
thirdpartyr�
TYPE_CHECKING�rr	r
rrr�r
r-rr�BytesIOr�rr�r,r��compress�	_compress�
decompress�_decompressr[rZr\rGrHrIrBrCr<r=r>r?r;r9r:rF�DIRSTATE_V2_DIRECTORY� DIRSTATE_V2_ALL_UNKNOWN_RECORDED� DIRSTATE_V2_ALL_IGNORED_RECORDEDr�rr�r�rYrgr|�REVLOGV1r�r�r�r�r�r�r�r�r6r3�<module>r�s���#�	��
�
����
������1�7�	����
�:�:��	����
�-�-���M�M�	��o�o��
��
�	���"������#��$�� &��"��#)� �%��)/�&� '����%,�"���#*� �#*� ����d���o!�o!� �o!�d�X:�X:�v7�/�7�8.J�;�.J�b( ��( �^�$�$�	;�
�;�
L�;�$(�9*�;�9*�x1-�|�1-�hG�
�*r6