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

p��g%L��
�SSKrSSKrSSKrSSKJr SSKJr \"\"5S5 "SS\R5r	"SS	\R5r
"S
S\R5r"SS
5r"SS5r
"SS5rg)�N�)�errors)�lazy_importz[
from breezy import (
    merge,
    transform,
)
from breezy.bzr import (
    pack,
    )
c��\rSrSrSrSrg)�ShelfCorrupt�'zShelf corrupt.�N)�__name__�
__module__�__qualname__�__firstlineno__�_fmt�__static_attributes__r	��./usr/lib/python3/dist-packages/breezy/shelf.pyrr's���Drrc��\rSrSrSrSrSrg)�
NoSuchShelfId�+z.No changes are shelved with id "%(shelf_id)d".c�>�[RRXS9 g)N)�shelf_id�r�BzrError�__init__��selfrs  rr�NoSuchShelfId.__init__.s����� � �� �9rr	N�r
rrr
rrrr	rrrr+s��;�D�:rrc��\rSrSrSrSrSrg)�InvalidShelfId�2z?"%(invalid_id)s" is not a valid shelf id, try a number instead.c�>�[RRXS9 g)N)�
invalid_idr)rr"s  rr�InvalidShelfId.__init__5s����� � �� �=rr	Nrr	rrrr2s��L�D�>rrc��\rSrSrSrSSjrSrSrSrSr	S	r
S
r\S5r
SrS
rSrSSjrSrSrSr\SSj5rSSjr\SSj5rSrg)�ShelfCreator�9z5Create a transform to shelve objects and its inverse.Nc�p�XlUR5UlX lURR	5Ul0Ul0Ul0UlURURUS9Ul	g! UR
R5 e=f! URR5 e=f)aaConstructor.

:param work_tree: The working tree to apply changes to. This is not
    required to be locked - a tree_write lock will be taken out.
:param target_tree: The tree to make the working tree more similar to.
    This is not required to be locked - a read_lock will be taken out.
:param file_list: The files to make more similar to the target.
)�specific_filesN)�	work_tree�	transform�work_transform�target_tree�preview_transform�shelf_transform�renames�creation�deletion�iter_changes�finalize)rr)r,�	file_lists    rr�ShelfCreator.__init__<s���#��'�1�1�3���	�*��#'�#3�#3�#E�#E�#G�D� �	
�!��� "��
� "��
�$-�$:�$:��$�$�Y�%;�%��!��
��$�$�-�-�/���	����(�(�*��s�%B�4A8�8B�B�B5c#�j# �URGHnURScURSS:XaM)URScURSS:XaMNURSbURSSLa|URSURSURSUR4UR
UR'SURURSURS4v� M�URSbURSSLa}URSURSURSUR4URUR'SURURSURS4v� GM�URSURS:wd URSURS:waLURUR4URUR'SUR4UR-v� URSURS:wa=S	URURSURSURS4v� GMtURSS
:XasURRURS5nURRURS5nSURURSUU4v� GM�UR(dGMSUR4v� GM! g7f)
a�Iterable of tuples describing shelvable changes.

As well as generating the tuples, this updates several members.
Tuples may be::

   ('add file', file_id, work_kind, work_path)
   ('delete file', file_id, target_kind, target_path)
   ('rename', file_id, target_path, work_path)
   ('change kind', file_id, target_kind, work_kind, target_path)
   ('modify text', file_id)
   ('modify target', file_id, target_target, work_target)
rNr�F�add file�delete file�rename�change kind�symlink�
modify target�modify text)r2�kind�name�	versioned�	parent_idr0�file_id�pathr1r/r,�get_symlink_targetr)�changed_content)r�change�t_target�w_targets    r�iter_shelvable�ShelfCreator.iter_shelvableXs�����'�'�F�
�{�{�1�~�%�&�+�+�a�.�B�*>���{�{�1�~�%�&�+�+�a�.�B�*>���{�{�1�~�%��)9�)9�!�)<��)E��K�K��N��K�K��N��$�$�Q�'��$�$�	1��
�
�f�n�n�-�"�6�>�>�6�;�;�q�>�6�;�;�q�>�R�R����Q��'�6�+;�+;�A�+>�%�+G��K�K��N��K�K��N��$�$�Q�'��$�$�	1��
�
�f�n�n�-�%�f�n�n�f�k�k�!�n�f�k�k�RS�n�U�U��K�K��N�f�k�k�!�n�4��'�'��*�f�.>�.>�q�.A�A�4:�K�K��AQ�AQ�3R�D�L�L����0�#�V�^�^�4�v�{�{�B�B��;�;�q�>�V�[�[��^�3�%�������A�����A�����A�����[�[��^�y�0�#�/�/�B�B�6�;�;�q�>�R�H�#�~�~�@�@����Q��P�H�'�������A�� � ����+�+�+�(�&�.�.�9�9�k(�s�LL3�L3c�h�USS:XaURUS5 g	USS:XaURUS5 g	USS:XaURUS5 g	USS;aURUS5 g	USS:XaUR	US5 g	[SR
US55e)
z-Shelve a change in the iter_shelvable format.rr:rr9r8)r;r>r=zUnknown change kind: "{}"N)�
shelve_rename�shelve_deletion�shelve_creation�shelve_content_change�shelve_modify_target�
ValueError�format�rrGs  r�
shelve_change�ShelfCreator.shelve_change�s����!�9�� ����v�a�y�)�
�A�Y�-�
'�� � ����+�
�A�Y�*�
$�� � ����+�
�A�Y�8�
8��&�&�v�a�y�1�
�A�Y�/�
)��%�%�f�Q�i�0��8�?�?��q�	�J�K�Krc�^�SnUR5HnURU5 M USL$)zUShelve all changes.

:return: ``True`` if changes were shelved, otherwise ``False``.
N)rJrUrTs  r�
shelve_all�ShelfCreator.shelve_all�s5��
���)�)�+�F����v�&�,��T�!�!rc��URUup#URRU5nURRUS5nURRUSXT5 URRU5nURRUS5nURRUSXv5 g)zZShelve a file rename.

:param file_id: The file id of the file to shelve the renaming of.
rrN)r/r+�trans_id_file_id�adjust_pathr.)rrC�names�parents�
w_trans_id�work_parent�
s_trans_id�shelf_parents        rrM�ShelfCreator.shelve_rename�s���
���g�.����(�(�9�9�'�B�
��)�)�:�:�7�1�:�F�����'�'��a��+�J��)�)�:�:�7�C�
��+�+�<�<�W�Q�Z�H�����(�(��q��<�Lrc� �URRU5nURRU5nURR	U5nURRU5 URR
X45 URRU5nURRU5nURR	U5nURRU5 URR
Xg5 g)z�Shelve a change of symlink target.

:param file_id: The file id of the symlink which changed target.
:param new_target: The target that the symlink should have due
    to shelving.
N)	r,�id2pathrEr+r[�delete_contents�create_symlinkr)r.)rrC�new_path�
new_targetr_�old_path�
old_targetras        rrQ�!ShelfCreator.shelve_modify_target�s����#�#�+�+�G�4���%�%�8�8��B�
��(�(�9�9�'�B�
����+�+�J�7����*�*�:�B��>�>�)�)�'�2���^�^�6�6�x�@�
��)�)�:�:�7�C�
����,�,�Z�8����+�+�J�Crc�j�URRU5nURRU5 URRX#5 URRU5nURRU5 URX!5nURRXT5 g)z�Shelve text changes to a file, using provided lines.

:param file_id: The file id of the file to shelve the text of.
:param new_lines: The lines that the file should have due to shelving.
N)r+r[rf�create_filer.�_inverse_lines)rrC�	new_linesr_ra�
inverse_liness      r�shelve_lines�ShelfCreator.shelve_lines�s����(�(�9�9�'�B�
����+�+�J�7����'�'�	�>��)�)�:�:�7�C�
����,�,�Z�8��+�+�I�?�
����(�(��Crc��URU5nURU5 [RXXR	U55 g�N)r[rfr*�create_from_treere)�tt�treerC�trans_ids    r�_content_from_tree�ShelfCreator._content_from_tree�s9���&�&�w�/��
���8�$��"�"�2��|�|�G�7L�Mrc��URURURU5 URURURU5 g)z�Shelve a kind change or binary file content change.

:param file_id: The file id of the file to shelve the content change
    of.
N)rzr+r,r.r))rrCs  rrP�"ShelfCreator.shelve_content_change�s>��	
���� 3� 3�T�5E�5E�w�O����� 4� 4�d�n�n�g�Nrc
��URUup#pEUS(+nURURUURURUUUU5 g)z�Shelve creation of a file.

This handles content and inventory id.
:param file_id: The file_id of the file to shelve creation of.
rN)r0�_shelve_creationr)r+r.)rrCr?r@�parentrA�versions       rrO�ShelfCreator.shelve_creation�sY��)-�
�
�g�(>�%��F���l�"������N�N������ � �����		
rc� �URUup#pEURRU5nURR	U5(dSnUS(+nURURUURURUUUUUS9	 g)z�Shelve deletion of a file.

This handles content and inventory id.
:param file_id: The file_id of the file to shelve deletion of.
Nr)�
existing_path)r1r,rer)�has_filenamerr.r+)rrCr?r@r�rAr�r�s        rrN�ShelfCreator.shelve_deletions���)-�
�
�g�(>�%��F��(�(�0�0��9�
��~�~�*�*�=�9�9� �M���l�"���������� � ��������'�	�
	
rc
��URU5n
UbUbURU
5 URU
5 U	bURU	5nOURU5nUbbURU5nUR	XlU5 U	c<UcURS/U5 O%[RXKXRU55 U(aURX�S9 gg)Nr)rC)
r[rf�unversion_file�trans_id_tree_pathr\rnr*rvre�version_file)
rrxrC�from_transform�to_transformr?r@r�r�r�r_ra�s_parent_ids
             rr�ShelfCreator._shelve_creations���$�4�4�W�=�
���$�"2��*�*�:�6��%�%�j�1��$�%�8�8��G�J�%�6�6�w�?�J���&�7�7��?�K��$�$�T�
�C��$��<� �,�,�c�U�J�?��.�.�$�$���W�8M����%�%�j�%�B�rc�0�URRU5nURRU5nURRU5nURRU5nSSKnSSKJn U"UUUURS9R5$)zAProduce a version with only those changes removed from new_lines.rN)�Merge3)�sequence_matcher)	r,re�get_file_linesr)�patiencediff�merge3r��PatienceSequenceMatcher�merge_lines)	rrprC�target_path�target_lines�	work_path�
work_linesr�r�s	         rro�ShelfCreator._inverse_lines@s����&�&�.�.�w�7���'�'�6�6�{�C���N�N�*�*�7�3�	��^�^�2�2�9�=�
��!�����)�A�A�	
�
�+�-�	rc�l�URR5 URR5 g)z0Release all resources used by this ShelfCreator.N)r+r3r.�rs rr3�ShelfCreator.finalizePs&�����$�$�&����%�%�'rc�8�URR5 g)z!Shelve changes from working tree.N)r+�applyr�s rr*�ShelfCreator.transformUs�����!�!�#rc��SU0nUbURS5US'UR[R"U5S5$)N�revision_id�utf-8�message)�smetadata)�encode�bytes_record�bencode)�
serializer�revision_id�message�metadatas    r�metadata_record�ShelfCreator.metadata_recordYsB��"�K�0����#*�>�>�'�#:�H�Z� ��&�&�w���x�'@�BS�T�Trc��[RUR5 URR	5nURXRX25$)z�Serialize the shelved changes to a file.

:param shelf_file: A file-like object to write the shelf to.
:param message: An optional message describing the shelved changes.
:return: the filename of the written file.
)r*�resolve_conflictsr.r,�get_revision_id�_write_shelf)r�
shelf_filer�r�s    r�write_shelf�ShelfCreator.write_shelf`sE��	�#�#�D�$8�$8�9��&�&�6�6�8��� � ��-A�-A�;�X�Xrc�@�[R5nURUR55 UR	XSU5nURU5 URU5HnURU5 M URUR
55 gru)�pack�ContainerSerialiser�write�beginr��	serialize�end)�clsr�r*r�r�r�r��bytess        rr��ShelfCreator._write_shelfks���-�-�/�
�����)�)�+�,��&�&�z��H������"��(�(��4�E����U�#�5�������)�*r)r0r1r2r/r.r,r+r)ru)r
rrr
�__doc__rrJrUrXrMrQrr�staticmethodrzrPrOrNrror3r*r�r��classmethodr�rr	rrr%r%9s���?��8B:�H
L�"�M�D�&
D��N��N�
O�
�&
�B� C�D� (�
$��U��U�	Y��+��+rr%c�Z�\rSrSrSrSr\S5r\S5r\	S5r
SrSrS	r
g
)�	UnshelverivzUnshelve shelved changes.c�4�XlX lX0lX@lg)z�Constructor.

:param tree: The tree to apply the changes to.
:param base_tree: The basis to apply the tranform to.
:param message: A message from the shelved transform.
N)rx�	base_treer*r�)rrxr�r*r�s     rr�Unshelver.__init__ys���	�"��"���rc��[R5nURUR55 [	UR55$ru)r��ContainerPushParser�accept_bytes�read�iter�read_pending_records)r��parsers  r�iter_records�Unshelver.iter_records�s9���)�)�+�����J�O�O�-�.��F�/�/�1�2�2rc��[U5upUSS:wa[e[R"U5nUR	S5nUbURS5US'U$)Nrr�r�r�)�nextrr��bdecode�get�decode)�recordsr]�metadata_bytesr�r�s     r�parse_metadata�Unshelver.parse_metadata�sZ�� $�W�
�����8�~�%����?�?�>�2���,�,�z�*����#*�>�>�'�#:�H�Z� ��rc�d�URU5nURU5nUSnURU5nUR5nURU5 U"XXtRS55$![Ra( UR
RRU5nNtf=f)z�Create an Unshelver from a tree and a shelf file.

:param tree: The tree to apply shelved changes to.
:param shelf_file: A file-like object containing shelved changes.
:return: The Unshelver.
r�r�)
r�r��
revision_treer�NoSuchRevisionInTree�branch�
repositoryr-�deserializer�)�klassrxr�r�r��base_revision_idr�rws        r�from_tree_and_shelf�Unshelver.from_tree_and_shelf�s����$�$�Z�0���'�'��0��#�N�3��	O��*�*�+;�<�I��
(�
(�
*��
���w���T�b�,�,�z�*B�C�C��	�*�*�	O����.�.�<�<�=M�N�I�	O�s�A3�39B/�.B/c���URR5n[RR	UR
XR5n[RUlU$)z.Return a merger that can unshelve the changes.)	r*�get_preview_tree�merge�Merger�from_uncommittedrxr��Merge3Merger�
merge_type)rr,�mergers   r�make_merger�Unshelver.make_merger�sE���n�n�5�5�7�����.�.�t�y�y�+�~�~�V��!�.�.����
rc�8�URR5 g)z-Release all resources held by this Unshelver.N)r*r3r�s rr3�Unshelver.finalize�s�������!r)r�r�r*rxN)r
rrr
r�rr�r�r�r�r�r�r3rr	rrr�r�vsR��#�
��3��3�
�����D��D�$�"rr�c�^�\rSrSrSrSrSrSrSrSSjr	S	r
S
rSrSr
S
rSrSrg)�ShelfManageri�z#Maintain a list of shelved changes.c�p�XlURS5UlURR5 g)N�shelf)rx�clone�	transport�ensure_base)rrxr�s   rr�ShelfManager.__init__�s'���	�"����1������"�"�$rc��SU3$)Nzshelf-r	rs  r�get_shelf_filename�ShelfManager.get_shelf_filename�s����z�"�"rc���[R"S5n/nUHBnURU5nUcMUR[	URS555 MD U$)Nzshelf-([1-9][0-9]*)r)�re�compile�match�append�int�group)r�	filenames�matcher�	shelf_ids�filenamer�s      r�
get_shelf_ids�ShelfManager.get_shelf_ids�sW���*�*�2�3���	�!�H��M�M�(�+�E�� �� � ��U�[�[��^�!4�5�"��rc��UR5nUcSnOUS-nURU5n[URR	U5S5nX$4$)z=Return a file object and id for a new set of shelved changes.r�wb)�
last_shelfr��openr��
local_abspath)rr�
next_shelfrr�s     r�	new_shelf�ShelfManager.new_shelf�sV���_�_�&�
����J�#�a��J��*�*�:�6���$�.�.�6�6�x�@�$�G�
��%�%rNc��UR5up4URXB5 UR5 UR5 U$!UR5 f=f)z/Store the changes in a ShelfCreator on a shelf.)rr��closer*)r�creatorr�rr�s     r�shelve_changes�ShelfManager.shelve_changes�sR��!%���!1��
�	����
�4������������
����s�A�Ac���URU5n[URRU5S5$![a/nUR
[
R:wae[U5eSnAff=f)zwReturn the file associated with a shelf_id for reading.

:param shelf_id: The id of the shelf to retrive the file for.
�rbN)r�rr�r
�OSError�errno�ENOENTr)rrr�es    r�
read_shelf�ShelfManager.read_shelf�sc��
�*�*�8�4��	*�����4�4�X�>��E�E���	*��w�w�%�,�,�&����)�)��	*�s�$8�
A1�*A,�,A1c��URU5n[RURU5UR	5 $!UR	5 f=f)zfReturn an unshelver for a given shelf_id.

:param shelf_id: The shelf id to return the unshelver for.
)rr�r�rxr)rrr�s   r�
get_unshelver�ShelfManager.get_unshelver�sD��
�_�_�X�.�
�	��0�0����J�G������J����s�A�Ac���URU5n[RU5nUR5 [R	U5$!UR5 f=f)z5Return the metadata associated with a given shelf_id.)rr�r�rr�)rrr�r�s    r�get_metadata�ShelfManager.get_metadata�sR���_�_�X�.�
�	��,�,�Z�8�G������'�'��0�0��
����s�A
�
Ac�\�URU5nURRU5 g)zbDelete the shelved changes for a given id.

:param shelf_id: id of the shelved changes to delete.
N)r�r��delete)rrrs   r�delete_shelf�ShelfManager.delete_shelf�s&��
�*�*�8�4�������h�'rc�l�[URURRS555nU$)z!Return a list of shelved changes.�.)�sortedrr��list_dir�r�actives  r�active_shelves�ShelfManager.active_shelvess+����*�*�4�>�>�+B�+B�3�+G�H�I���
rc�L�UR5n[U5S:�aUS$g)z1Return the id of the last-created shelved change.r���N)r.�lenr,s  rr�ShelfManager.last_shelfs(���$�$�&���v�;��?��"�:��r)r�rxru)r
rrr
r�rr�rrrrrr"r&r.rrr	rrr�r��s<��-�%�
#��	&��*�	�1�(��
rr�)rr��fastbencoder�r7rr�globalsrrrrr%r�r�r	rr�<module>r6s|��"
�	���$���I����6�?�?��:�F�O�O�:�>�V�_�_�>�z+�z+�z	<"�<"�~]�]r

Youez - 2016 - github.com/yon3zu
LinuXploit