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

p��g*����SrSSKrSSKrSSKrSSKrSSKJrJr SSKJ	r	J
r
 SSKJr "SS\	5r
"S	S
\	5rSr\R S:XaS
rSSjrSSjrSrSSjrSSjrSrg)zDiff and patch functionality.�N)�PIPE�Popen�)�BzrError�NoDiff3)�check_text_pathc��\rSrSrSrSrg)�PatchFailed�zPatch application failed�N)�__name__�
__module__�__qualname__�__firstlineno__�_fmt�__static_attributes__r��./usr/lib/python3/dist-packages/breezy/patch.pyr
r
s��)�Drr
c�&�\rSrSrSrSrSSjrSrg)�PatchInvokeError�"z*Error invoking patch: %(errstr)s%(stderr)sFc�n�Xl[R"UR5UlSU-Ulg)N�
)�	exception�os�strerror�errno�errstr�stderr)�self�ers   r�__init__�PatchInvokeError.__init__&s&�����k�k�!�'�'�*����V�m��r)rrrN��)r
rrrr�internal_errorr"rrrrrr"s��;�D��N�$rrT�ntFc	���[U[U5[[[[S9nUR	U5up4UR5nUS:a[
USSU*35eX4U4$)aSpawn a process, and wait for the result.

If the process is killed, an exception is raised

:param args: The command line, the first entry should be the program name
:param input: [optional] The text to send the process on stdin
:return: (stdout, stderr, status)
)�bufsize�stdin�stdoutr�	close_fdsrz killed by signal )r�lenr�
_do_close_fds�communicate�wait�	Exception)�args�input�processr+r�statuss      r�write_to_cmdr61sr�����E�
�����
�G��(�(��/�N�F�
�\�\�^�F�
��z��4��7�)�#5�v�g�Y�?�@�@��6�!�!rc��/SQnU(aURS5 UbURSU45 URU5 [X@5upVnU$)a
Apply a patch to a file, to produce another output file.  This is should
be suitable for our limited purposes.

:param patch_contents: The contents of the patch to apply
:type patch_contents: str
:param filename: the name of the file to apply the patch to
:type filename: str
:param output_filename: The filename to produce.  If None, file is     modified in-place
:type output_filename: str or NoneType
:param reverse: If true, apply the patch in reverse
:type reverse: bool
:return: 0 on success, 1 if some hunks failed
)�patch�-f�-s�--posix�--binaryz	--reverse�-o)�append�extendr6)�patch_contents�filename�output_filename�reverser2r+rr5s        rr8r8IsO��8�D�����K� ��"����T�?�+�,��K�K���)�$�?��F�F��Mrc���Sn[U5 [U5 [U5 /SQnU"US5 U"US5 U"US5 URXU45 [U5upgnUS;a[U5e[US5n
U
RU5 SSS5 U$![a*n	U	R[R
:Xa[eeSn	A	ff=f!,(df   U$=f)Nc�*�URSU45 g)Nz-L)r?)r2�labels  r�	add_label�diff3.<locals>.add_labelcs�����T�5�M�"r)�diff3z-Ez--merge�TREE�ANCESTORzMERGE-SOURCE)rr�wb)
rr?r6�OSErrorr�ENOENTrr1�open�write)�out_file�	mine_path�
older_path�
yours_pathrGr2�outputrr5r!�fs           rrIrIbs���#��I���J���J��%�D�
�d�F��
�d�J��
�d�N�#��K�K��
�3�4��!-�d�!3�����V������	
�h��	��	�����
��M�����7�7�e�l�l�"��M���	��
�	��M�s$�B�C�
C�)%C�C�
C%c
�.�[URXX4XVS9$)z�Apply a patch to a tree.

Args:
  tree: A MutableTree object
  patches: list of patches as bytes
  strip: Strip X segments of paths
  reverse: Apply reversal of patch
  dry_run: Dry run
)�out)�	run_patch�basedir)�tree�patches�striprC�dry_run�quietrXs       r�
patch_treer`|s���T�\�\�7�7�U�T�Trc	���USUSSU3S/n	U(aU	RS5 [RS:XaU	RS5 U(aU	RS5 U(aN[RRS	5(aU	RS
5 OU	RS5 [n
OSn
UbU	RU5 [U	[[U
S9nUH'n
URR[U
55 M) URR5 UR5nU(dGUb*URURR55 OURR5 US
:wa
[!5eU$![an[U5eSnAff=f![a(n[X�RR55eSnAff=f)Nz-dr:z-pr9z--quiet�win32r<z-R�freebsdz--checkz	--dry-run)r*r+rr)r>�sys�platform�
startswithrrrMrr*rP�bytes�closer�readr0r+r
)�	directoryr\r]rCr^r_�
_patch_cmd�target_filerXr2rr4r!r8�results               rrYrY�s���
��i���E�7�|�T�B�D�����I��
�|�|�w�����J������D����<�<�"�"�9�-�-��K�K�	�"��K�K��$����������K� �"���D��f�E��9��E��M�M����e��-���
�
����
�\�\�^�F���?��I�I�g�n�n�)�)�+�,��N�N���!�
��{��m���M��'�"��q�!�!��"���9��q�.�.�"5�"5�"7�8�8��9�s1�
F�"AF6�
F3�#F.�.F3�6
G(�#G#�#G(c�z�[R"5nURU5 UR5 SR	UVs/sHo3R5PM sn5nSSSSSSSURS	S/
n[XT5upgnS
S
S
5 WS:XaW/$[W5es snf!,(df   N'=f)aIterate through a series of lines with a patch applied.
This handles a single file, and does exact, not fuzzy patching.

:param orig_lines: The unpatched lines.
:param hunks: An iterable of Hunk instances.

This is different from breezy.patches in that it invokes the patch
command.
rr8r9r:r;r<r=�-z-rNr)	�tempfile�NamedTemporaryFile�
writelines�flush�join�as_bytes�namer6r
)	�
orig_lines�hunksrV�hunk�
serializedr2r+rr5s	         r�iter_patched_from_hunksr{�s���
�	$�	$�	&�!�	���Z� �	���	��X�X�5�A�5�4�}�}��5�A�B�
��������
�F�F���
��".�d�!?����%
'�&��{��x��
�f�
���!B�
'�	&�s�1B,�B'
� +B,�'B,�,
B:r$)NF)rFFFN)rFFFr8NN)�__doc__rrrdrp�
subprocessrr�errorsrr�textfilerr
rr.rvr6r8rIr`rYr{rrr�<module>r�s���$$��	�
��"�%�%�*�(�*�$�x�$��
��7�7�d�?��M�"�0�2�6LP�U�$���
����4�nr

Youez - 2016 - github.com/yon3zu
LinuXploit