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__/linelog.cpython-313.pyc
�

6�hJ<���SrSSKJr SSKrSSKrSSKrSSKJr SSKJr \R(aSSKrSSK
Jr \R"S5r
"S	S
\5r\R "SS55r\R "S
S55r"SS5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5rSr"SS5rg)a�linelog is an efficient cache for annotate data inspired by SCCS Weaves.

SCCS Weaves are an implementation of
https://en.wikipedia.org/wiki/Interleaved_deltas. See
mercurial/helptext/internals/linelog.txt for an exploration of SCCS weaves
and how linelog works in detail.

Here's a hacker's summary: a linelog is a program which is executed in
the context of a revision. Executing the program emits information
about lines, including the revision that introduced them and the line
number in the file at the introducing revision. When an insertion or
deletion is performed on the file, a jump instruction is used to patch
in a new body of annotate information.
�)�annotationsN)�List�)�attr)�pycompats>IIc��\rSrSrSrSrg)�LineLogError�,z>Error raised when something bad happens internally in linelog.�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��3/usr/lib/python3/dist-packages/mercurial/linelog.pyr	r	,s��Hrr	c�z�\rSrSr\R
"5r\R
"5r\R
"5rSr	g)�lineinfo�0rN)
rr
rrr�ib�rev�linenum�_offsetrrrrrr0s%���'�'�)�C��g�g�i�G��g�g�i�Grrc��\rSrSr\R
"5r\R
"\\S9r	\R
"5r
SrSrg)�annotateresult�:��typec�,�[UR5$�N)�iter�lines��selfs r�__iter__�annotateresult.__iter__@s���D�J�J��rrN)
rr
rrrrrrrr#�_eofr&rrrrrr:s/��
�'�'�)�C��G�G��h��(�E��7�7�9�D� rrc���\rSrSr\R
r\RS5r\RS5r	Sr
\RS5r\RS5r\RS5r
Srg	)
�_llinstruction�Dc��gr!r�r%�op1�op2s   r�__init__�_llinstruction.__init__G���rc��gr!rr$s r�__str__�_llinstruction.__str__Kr2rc��[U5$r!)�strr$s r�__repr__�_llinstruction.__repr__Os���4�y�rc��gr!r�r%�others  r�__eq__�_llinstruction.__eq__Rr2rc��g)z5Encode this instruction to the binary linelog format.Nrr$s r�encode�_llinstruction.encodeV��rc��g)a'Execute this instruction.

Args:
  rev: The revision we're annotating.
  pc: The current offset in the linelog program.
  emit: A function that accepts a single lineinfo object.

Returns:
  The new value of pc. Returns None if exeuction should stop
  (that is, we've found the end of the file.)
Nr�r%r�pc�emits    r�execute�_llinstruction.executeZrBrrN)rr
rr�abc�ABCMeta�
__metaclass__�abstractmethodr0r4r8r=r@rGrrrrr*r*Ds����K�K�M����
��
�	���
��
��	���
��
�	���D��D�	�����rr*c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�_jge�iz@If the current rev is greater than or equal to op1, jump to op2.c��XlX lgr!��_cmprev�_targetr-s   rr0�
_jge.__init__l������rc�8�SURUR4-$)Nz	JGE %d %drQr$s rr4�_jge.__str__ps���d�l�l�D�L�L�9�9�9rc��[U5[U5:H=(a9 URUR:H=(a URUR:H$r!�rrRrSr;s  rr=�_jge.__eq__s�A����J�$�u�+�%�
.�����
�
�-�
.�����
�
�-�	
rc�\�[RURS-UR5$�N���_llentry�packrRrSr$s rr@�_jge.encodezs ���}�}�T�\�\�Q�.����=�=rc�B�XR:�aUR$US-$�NrrQrDs    rrG�_jge.execute}s���,�,���<�<���A�v�
rrQN�rr
rrrr0r4r=r@rGrrrrrNrNis��J��:�
�>�rrNc�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�_jump�z=Unconditional jumps are expressed as a JGE with op1 set to 0.c�8�US:wa[SU-5eX lg)Nrs%malformed JUMP, op1 must be 0, got %d)r	rSr-s   rr0�_jump.__init__�s���!�8��G�#�M�N�N��rc� �SUR-$)NzJUMP %d�rSr$s rr4�
_jump.__str__�s���D�L�L�)�)rc�p�[U5[U5:H=(a URUR:H$r!)rrSr;s  rr=�_jump.__eq__�s'���D�z�T�%�[�(�J�T�\�\�U�]�]�-J�Jrc�B�[RSUR5$�Nr)r`rarSr$s rr@�_jump.encode�s���}�}�Q����-�-rc��UR$r!rmrDs    rrG�
_jump.execute�s���|�|�rrmNrfrrrrhrh�s��G��
*�K�.�rrhc�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
r(�z1EOF is expressed as a JGE that always jumps to 0.c�T�US:wa[SU-5eUS:wa[SU-5eg)Nrs$malformed EOF, op1 must be 0, got %ds$malformed EOF, op2 must be 0, got %d)r	r-s   rr0�
_eof.__init__�s7���!�8��F��L�M�M��!�8��F��L�M�M�rc��g)N�EOFrr$s rr4�_eof.__str__�s��rc�0�[U5[U5:H$r!rr;s  rr=�_eof.__eq__�s���D�z�T�%�[�(�(rc�.�[RSS5$rr)r`rar$s rr@�_eof.encode�s���}�}�Q��"�"rc��gr!rrDs    rrG�_eof.execute�s��rrNrfrrrr(r(�s��;�N��)�#�rr(c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�_jl�z1If the current rev is less than op1, jump to op2.c��XlX lgr!rQr-s   rr0�_jl.__init__�rUrc�8�SURUR4-$)NzJL %d %drQr$s rr4�_jl.__str__�s���T�\�\�4�<�<�8�8�8rc��[U5[U5:H=(a9 URUR:H=(a URUR:H$r!rYr;s  rr=�
_jl.__eq__�r[rc�b�[RSURS--UR5$)Nrr^r_r$s rr@�
_jl.encode�s%���}�}�Q�$�,�,�!�"3�4�d�l�l�C�Crc�B�XR:aUR$US-$rdrQrDs    rrG�_jl.execute�s�������<�<���A�v�
rrQNrfrrrr�r��s��;��9�
�D�rr�c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�_line��zEmit a line.c��XlX lgr!��_rev�_origlinenor-s   rr0�_line.__init__�s
���	��rc�8�SURUR4-$)Nz
LINE %d %dr�r$s rr4�
_line.__str__�s���t�y�y�$�*:�*:�;�;�;rc��[U5[U5:H=(a9 URUR:H=(a URUR:H$r!)rr�r�r;s  rr=�_line.__eq__�sE����J�$�u�+�%�
6��	�	�U�Z�Z�'�
6�� � �E�$5�$5�5�	
rc�b�[RSURS--UR5$r])r`rar�r�r$s rr@�_line.encode�s&���}�}�Q�$�)�)�q�.�1�4�3C�3C�D�Drc�Z�U"[URURU55 US-$rd)rr�r�rDs    rrG�
_line.execute�s&���X�d�i�i��!1�!1�2�
6�7��A�v�
r)r�r�Nrfrrrr�r��s����<�
�E�rr�c�`�[RX5up#US-nUS-	nUS:Xa-US:XaUS:Xa[X#5$[
X#5$[X#5$US:Xa[X#5$US:Xa[X#5$[SU-5e![Ran[	SU-5eSnAff=f)z?Decode a single linelog instruction from an offset in a buffer.s!reading an instruction failed: %rN�r^rrsUnimplemented opcode %r)r`�unpack_from�struct�errorr	r(rhrNr�r��NotImplementedError)�data�offsetr.r/�e�opcodes      r�
_decodeoner��s���E��'�'��5����4�Z�F�

��(�C�
��{��!�8��a�x��C�~�%���?�"��C�~��	�1���3�}��	�1���S���
�8�6�A�
B�B���<�<�E��?�!�C�D�D��E�s�B�B-�B(�(B-c��\rSrSrSrSSjrSrSrSr\	S5r
S	rS
rSr
SSjrS
r\S5r\S5rSrSSjrSrg)�linelog�z1Efficient cache for per-line history information.Nc�`�Uc[SS5[SS5/nXlSUlX lgrr)r(�_program�
_lastannotate�_maxrev)r%�program�maxrevs   rr0�linelog.__init__�s1���?��A�q�z�4��1�:�.�G��
�!����rc��[U5[U5:H=(a9 URUR:H=(a URUR:H$r!)rr�r�r;s  rr=�linelog.__eq__sA����J�$�u�+�%�
.��
�
����/�
.�����
�
�-�	
rc�p�S[[U55UR[UR54-$)Nz"<linelog at %s: maxrev=%d size=%d>)�hex�idr��lenr�r$s rr8�linelog.__repr__s2��3���4��M��L�L���
�
��7
�
�	
rc��^�S[[[UR555-m[R"S5RU4Sj[
URSSS555$)Nz	%%%dd %%s�
c3�4># �UH
upTX4-v� M g7fr!r)�.0�idx�i�fmts   �r�	<genexpr>�#linelog.debugstr.<locals>.<genexpr>s����+
�)H�v�s�C�3�(�N�)H�s�r)r�r7r�r�sysstr�join�	enumerate)r%r�s @r�debugstr�linelog.debugstrs[����C��C��
�
�$6� 7�8�8�����u�%�*�*�+
�)2�4�=�=���3D�a�)H�+
�
�	
rc���[U5[R-S:wa'[S[U5[R4-5e[U5[R-n[	US5n[U[5(aSnOI[U[[45(a
URnO![S[U5R-5e[U[[[45(deURnX%:wa[SX%4-5e[SS5/n[SU5H.nUR[	X[R-55 M0 U"XdS9$)Nrs9invalid linelog buffer size %d (must be a multiple of %d)z,Expected one of _jump, _jge, or _jl. Got %s.sFcorrupt linelog data: claimed %d entries but given data for %d entriesr)r�)r�r`�sizer	r��
isinstancerhrNr�rRrrrSr(�range�append)�cls�buf�expected�fakejger��
numentries�instructionsr�s        r�fromdata�linelog.fromdatas9���s�8�h�m�m�#�q�(��L��s�8�X�]�]�+�,��
��s�8�h�m�m�+���S�!�$���g�u�%�%��F�
��$���
-�
-��_�_�F��>��w�-�(�(�)��
��'�E�4��#5�6�6�6�6��_�_�
��!��=��(�)��
�
�Q��
�|���A�z�*�F����
�3����0F� G�H�+��<�/�/rc��[UR[UR55R	5nUSRSURSS55-$)Nrc3�@# �UHoR5v� M g7fr!)r@)r�r�s  rr��!linelog.encode.<locals>.<genexpr>:s���D�2C�Q�h�h�j�j�2C�s�r)rNr�r�r�r@r�)r%�hdrs  rr@�linelog.encode8sI���4�<�<��T�]�]�!3�4�;�;�=���S�X�X�D�$�-�-���2C�D�D�D�Drc�.�/UlSUlSUlgrr)r�r�r�r$s r�clear�
linelog.clear<s����
����!��rc	�:�URXUS[U5US9$)Nr)�_internal_blines)�replacelinesr�)r%r�a1�a2�bliness     r�replacelines_vec�linelog.replacelines_vecAs)��� � ��R��C��K�&�!�
�	
rc	�@�UR(a
URnOURU5nU[UR5:�a$[	SU[UR5U4-5eU[UR5:Xa$[SS5n[
SSUR
5n	O(URUn	URU	RnURRn
U
"5nURRn/n
U
RnXE:a�X�U-
S--nU"[X55 [XE5HdnUc,U"[
UUU
"555 U"[UU55 M2UUunnU"[
UUU
"555 U"[UU55 Mf X#:a�U[UR5:�a$[	SU[UR5U4-5eU[UR5:Xa
UR
nOURURnUS:�a.XR:aURUS-
RS-nU"[UU55 U
"5nU"U5 [!U["[
45(dU"[#SU	RS-55 [#SU5URU	R'[URR5U:�aUURRUlO([!U[
5(deUURlX�RRX#&[%URR&U5URlXR:�aXlgg)z+Replace lines [a1, a2) with lines [b1, b2).s-%d contains %d lines, tried to access line %drrN)r��annotater�r#r	r(rr�r�__len__r�r�r�r�r�rNr�rh�maxr)r%rr�r��b1�b2r��ar�a1inst�a1info�
programlen�
oldproglen�
appendinst�
blineinfos�bappend�tgtr�newrev�
newlinenum�endaddr�a1instpcs                     rr��linelog.replacelinesFs	������#�#�B����s�#�B�
��B�H�H�
���@���B�H�H�
�r�*�+��
��3�r�x�x�=�
 ��!�Q�Z�F��a��B�G�G�,�F��X�X�b�\�F��]�]�6�>�>�2�F��]�]�*�*�
��\�
��]�]�)�)�
��
��#�#��
�7��R��!��,�C��s�3�}�%� ��=��#�+��H�S�'�:�<�@�A��u�S�'�2�3�)9�'�)B�&�F�J��H�V�Z���F�G��u�V�Z�8�9�)��7��C����M�!�"�D��C����M�2�.�/����s�2�8�8�}�$��'�'���(�(�2�,�.�.���A�v�#���,�
�(�(�2��6�*�2�2�Q�6���t�C��)�*��<���6���&�5�$�-�0�0��u�Q����� 2�3�4�(-�a��(<��
�
�f�n�n�%�
�t�!�!�'�'�(�2�-�3;�D���$�$�R�(�0��f�d�+�+�+�+�&.�D���#�*4��� � ��'�!$�T�%7�%7�%;�%;�S�!A����������L�rc�L�Sn/nSnUbiU[UR5:aPURUnUnURXUR5nUS-
nUbU[UR5:aMPUb[	SUR5-5e[
XW5nXplU$)Nrrz4Probably hit an infinite loop in linelog. Program:\n)r�r�rGr�r	r�rr�)r%rrEr#�executed�inst�lastpcr�s        rr��linelog.annotate�s���
�� "�����n��C��
�
�,>�!>��=�=��$�D��F����c�u�|�|�4�B���M�H�	�n��C��
�
�,>�!>�
�>��G��-�-�/�"��
��C��
/�����	rc��UR$r!)r�r$s rr��linelog.maxrev�s���|�|�rc��URRVs/sHoRUR4PM sn$s snf)z?Return the last annotation result. C linelog code exposed this.)r�r#rr)r%�ls  rr�linelog.annotateresult�s5��-1�,>�,>�,D�,D�E�,D�q����	�	�"�,D�E�E��Es�!=c�H�URRUR$r!)r�r#r)r%�lines  r�	getoffset�linelog.getoffset�s���!�!�'�'��-�5�5�5rc��U=(d Sn/n[[UR55H�nURUnUS-n[U[5(a
UR
nO�[U[5(aUs $[U[[45(aOK[U[5(a(URURUR45 O[SU-5eXr:XaUs $UnM� [S5e)z�Get all lines that ever occurred in [start, end).

Passing start == end == 0 means "all lines ever".

This works in terms of *internal* program offsets, not line numbers.
rsIllegal instruction %rsFailed to perform getalllines)r�r�r�r�rhrSr(r�rNr�r�r�r�r	)r%�start�endrEr#�stepr��nextpcs        r�getalllines�linelog.getalllines�s����Z�a�����#�d�m�m�,�-�D��=�=��$�D��!�V�F��$��&�&������D�$�'�'����D�3��+�.�.���D�%�(�(����d�i�i��)9�)9�:�;�"�#<�t�#C�D�D��}����B�.� �;�<�<r)r�r�r�rrr!)rr)rr
rrrr0r=r8r��classmethodr�r@r�r�r�r��propertyr�rrrrrrrr�r��s}��;��
�
�
��0��0�<E�"�

�
V�p�*�����F��F�6�=rr�)r�
__future__rrIr��typingr�
thirdpartyr�
TYPE_CHECKING�r�Structr`�	Exceptionr	�srrr*rNrhr(r�r�r�r�rrr�<module>rs���
�#�
�
�
���
������=�=�� ��I�9�I����������� � �� �"�"�J�>��4�N��*�>��,�.��4�N��6C�*f=�f=r