403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/hgext/fastannotate/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/hgext/fastannotate/__pycache__/revmap.cpython-313.pyc
�

6�h"��z�SSKJr SSKrSSKrSSKrSSKrSSKJr SSKJ	r
 SSKJ	r	 SrSr
Sr"SS	5rS
rg)�)�annotationsN)�hex)�error���c��\rSrSrSrSrSSjrSr\S5r	SSjr
S	rS
rSr
SrSS
jrSrSrSr\S5rSrSrg)�revmap�2zvtrivial hg bin hash - linelog rev bidirectional map

also stores a flag (uint8) for each revision, and track renames.
sREVMAP1Nc��XlS/UlS/Ul0UlS/UlS/UlSUlU(aF[RRU5(aUR5 gUR5 gg)acreate or load the revmap, optionally associate to a file

if path is None, the revmap is entirely in-memory. the caller is
responsible for locking. concurrent writes to a same file is unsafe.
the caller needs to make sure one file is associated to at most one
revmap object at a time.Nr����)�path�_rev2hsh�	_rev2flag�_hsh2rev�_renamerevs�_renamepaths�_lastmaxrev�os�exists�_load�flush)�selfrs  �;/usr/lib/python3/dist-packages/hgext/fastannotate/revmap.py�__init__�revmap.__init__:so���	����
�������
��3��� �E��������w�w�~�~�d�#�#��
�
���
�
��r
c���URSSUlURSSUlURR5UlURSSUlUR
SSUlSUlg)z>copy the map data from another revmap. do not affect self.pathNr)rrr�copyrrr)r�rhss  r�copyfrom�revmap.copyfromQsa�����Q���
����q�)������)�)�+��
��?�?�1�-����,�,�Q�/�����r
c�2�[UR5S-
$)z"return max linelog revision numberr)�lenr)rs r�maxrev�
revmap.maxrevZs���4�=�=�!�A�%�%r
c�t�XR;a"[R"S[U5-5e[	U5[
:wa[R"S[
-5e[	UR5nSnU(a	U[-nUbQX0RS:wa?U[-nURRU5 URRU5 URRU5 URRU5 XPRU'U(aUR5 U$)znadd a binary hg hash and return the mapped linelog revision.
if flush is True, incrementally update the file.
s%r is in revmap alreadyshsh must be %d-char longrr)rr�CorruptedFileErrorrr$�_hshlen�hgerror�ProgrammingErrorr�sidebranchflagr�
renameflagr�appendrr)r�hsh�
sidebranchrr�idx�flags       rr.�
revmap.append_s���-�-���*�*�*�S��X�5��
��s�8�w���*�*�+�g�5��
��$�-�-� ������N�"�D����(9�(9�"�(=� =��J��D����#�#�C�(����$�$�T�*��
�
���S�!������d�#� �
�
�c����J�J�L��
r
c�L�XR:�dUS:agURU$)z>convert linelog revision to hg hash. return None if not found.rN)r%r�r�revs  r�rev2hsh�revmap.rev2hshzs$�������a����}�}�S�!�!r
c�L�XR:�dUS:agURU$)z[get the flag (uint8) for a given linelog revision.
return None if revision does not exist.
rN)r%rr5s  r�rev2flag�revmap.rev2flag�s&�������a����~�~�c�"�"r
c��XR:�dUS:ag[R"URU5S-
nURU$)zSget the path for a given linelog revision.
return None if revision does not exist.
rNr)r%�bisect�bisect_rightrr)rr6r1s   r�rev2path�revmap.rev2path�sE�������a����!�!�$�"2�"2�C�8�1�<��� � ��%�%r
c�8�URRU5$)z>convert hg hash to linelog revision. return None if not found.)r�get)rr/s  r�hsh2rev�revmap.hsh2rev�s���}�}� � ��%�%r
c��S/UlS/Ul0UlS/UlSUlU(aUR5 gg)z3make the map empty. if flush is True, write to diskNr
r)rrr�	_rev2pathrr)rrs  r�clear�revmap.clear�s?�����
�������
����������J�J�L�r
c�X�UR(dgURS:Xar[URS5nURUR5 [S[
UR55HnURX!5 M SSS5 Oc[URS5n[URS-[
UR55HnURX!5 M SSS5 URUlg!,(df   N =f!,(df   N1=f)z write the state down to the fileNr�wbr�ab)
rr�open�write�HEADER�ranger$r�	_writerevr%)r�f�is   rr�revmap.flush�s����y�y�����r�!��d�i�i��&�!�������$��q�#�d�m�m�"4�5�A��N�N�1�(�6�'�&�
�d�i�i��&�!��t�/�/�!�3�S����5G�H�A��N�N�1�(�I�'� �;�;���'�&��
'�&�s�AD
�+AD�

D�
D)c�|�UR(dgSn[n[URS5nUR[	UR
55UR
:wa[R"5eURSS9 URU5nU(dO�[U5n[	UR5nU[-(aGURU5nURRU5 URRU5 URU5n[	U5U:wa[R"5eX`R U'UR"RU5 URRU5 GM
SSS5 UR$Ulg!,(df   N =f)zload state from fileNr�rbF)r)rr)rL�readr$rNrr(rG�ordrr-�	_readcstrrr.rrrr%r)	r�flaglen�hshlenrQ�bufr2r6rr/s	         rr�revmap._load�sG���y�y������
�$�)�)�T�
"�a��v�v�c�$�+�+�&�'�4�;�;�6��.�.�0�0��J�J�U�J�#���f�f�W�o�����3�x���$�-�-�(���*�$��>�>�!�,�D��$�$�+�+�C�0��%�%�,�,�T�2��f�f�V�n���s�8�v�%��2�2�4�4�%(�
�
�c�"����%�%�d�+��
�
�$�$�S�)��	#�( �;�;���)#�
"�s�E"F-�-
F;c�L�URUnURUnUR[R"SU55 U[
-(aAUR
U5nUc[R"SU-5eURUS-5 URU5 g)zappend a revision data to file�BNscannot find path for %s�)	rrrM�struct�packr-r?rr()rr6rQr2r/rs      rrP�revmap._writerev�s����~�~�c�"���m�m�C� ��	������D�$�'�(��*���=�=��%�D��|��.�.�/I�C�/O�P�P�
�G�G�D�5�L�!�	����r
c��SnURS5nU(d[R"5eUS:XaU$X-
nM<)z,read a C-language-like ''-terminated stringr
rr_)rVrr()rQr[�chs   rrX�revmap._readcstr�sH����������B���.�.�0�0��U�{���
�
�I�C�
r
c��[U[5(aUup#OUR5UR5p2UR	U5nUcgUbX0RU5:wagUR
U5[-S:H$)z�(fctx or (node, path)) -> bool.
test if (node, path) is in the map, and is not in a side branch.
f can be either a tuple of (node, path), or a fctx.
Fr)�
isinstance�tuple�noderrCr?r:r,)rrQr/rr6s     r�__contains__�revmap.__contains__�ss��
�a�����I�C������!�&�&�(���l�l�3����;�����
�
�c�(:� :���
�
�c�"�^�3��9�9r
)rrrrrrrFr)N)FNF)F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rNrr!�propertyr%r.r7r:r?rCrGrrrP�staticmethodrXrj�__static_attributes__�r
rr
r
2sr���
�F��.��&��&��6"�#�&�&�	�
'�'�<
��
��
�:r
r
c�F�Sn[US5nUR[*[R5 UR5[
[R5:�aUR[5nSSS5 U$!,(df   U$=f![a U$f=f)z�return the last hash in a revmap, without loading its full content.
this is equivalent to `m = revmap(path); m.rev2hsh(m.maxrev)`, but faster.
NrU)rL�seekr)�io�SEEK_END�tellr$r
rNrV�OSError)rr/rQs   r�getlastnoder{�s����C�
�
�$��
��
�F�F�G�8�R�[�[�)��v�v�x�#�f�m�m�,�,��f�f�W�o����J�
�
��J���
���J�
�s/�B�A&B�6B�
B�
B�B�
B �B )�
__future__rr=rwrr`�mercurial.noder�	mercurialrr*�r,r-r)r
r{rtr
r�<module>r�sJ��#�
�	�	�
����,���
�
��B:�B:�Jr

Youez - 2016 - github.com/yon3zu
LinuXploit