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/dulwich/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/dulwich/__pycache__/patch.cpython-313.pyc
�

mEdg~1���SrSSKrSSKrSSKJr SSKJrJrJ	r	J
r
 SSKJrJ
r
Jr SSKJr SrSSS
jjrSrS	\4SjrSS
jrSrSrSrSS\S	S4SjjrSrSSjrSSSjjrSS\
\	\4S\\4SjjrSSjrg)z~Classes for dealing with git am-style patches.

These patches are basically unified diffs with some extra metadata tacked
on.
�N)�SequenceMatcher)�BinaryIO�Optional�TextIO�Union�)�S_ISGITLINK�Blob�Commit)�ObjectContaineri@�returnc�F�U=(d
 [USS5n[U[5(aURU5nUupgUR	SUR
-S-[R"UR5RU5-S-5 UR	SUR-S-5 UR	S[R"S5RU5-S-5 UR	S	US
US3RU5UR-S-5 UR	S5 UR	S5 S
SKnURS/URURS9n	U	RU5up�UR	U
5 UR	S5 UR	U5 UR	S5 UcS
SKJn UR	SU-5 gUR	URU5S-5 g![ ["4a Nvf=f)z�Write a individual file patch.

Args:
  commit: Commit object
  progress: Tuple with current patch number and total.

Returns:
  tuple with filename and contents
�encoding�asciisFrom � �
�From: sDate: z%a, %d %b %Y %H:%M:%S %ZzSubject: [PATCH �/�] �---
rN�diffstat)�stdout�stdin�-- 
)�__version__sDulwich %d.%d.%d
)�getattr�
isinstance�str�encode�write�id�time�ctime�commit_time�author�strftime�message�
subprocess�Popen�PIPE�communicate�ImportError�OSError�dulwichr)
�f�commit�contents�progress�versionr�num�totalr(�pr�_�dulwich_versions
             �//usr/lib/python3/dist-packages/dulwich/patch.py�write_commit_patchr:'s����:�7�1�j�'�:�H��(�C� � ��?�?�8�,���L�S��G�G��
�)�)�	�
�	��*�*�V�'�'�
(�
/�
/��
9�	:��		���G�G�I��
�
�%��-�.��G�G��D�M�M�"<�=�D�D�X�N�N�QV�V���G�G��C�5��%���	+�3�3�H�=����N�QV�V���G�G�E�N��G�G�H�������
�L����
���
�
���
�
�h�/�
��	�����	������G�G�H���G�G�H����:�	���%��7�8�	������x�(�5�0�1��
��!�
��
�s�
*H
�
H �H c�z�URRSS9nUR5SRSS5$)zbDetermine the summary line for use in a filename.

Args:
  commit: Commit
Returns: Summary string
�replace)�errorsr� �-)r'�decode�
splitlinesr<)r0�decodeds  r9�get_summaryrC]s<���n�n�#�#�9�#�5�G������"�*�*�3��4�4�c�L�US-nX-
nUS:XaU$U(dUS-nUSU3$)z!Convert range to the "ed" format.r�,�)�start�stop�	beginning�lengths    r9�_format_range_unifiedrLis@����	�I�
�\�F�
��{������Q��	��[��&��"�"rDc
#��# �Sn
[SX5RU5GH>nU
(dpSn
U(aSU3OSnU(aSU3OSn
SURU5UU3RU	5v� SURU5U
U3RU	5v� USUS	p�[	US
US5n[	USUS
5nSUSUSU3RU	5v� UHtunnnnnUS:XaUUUH
nSU-v� M M$US;a!UUUHnUS	SS:XdUS-
nSU-v� M US;dMSUUUHnUS	SS:XdUS-
nSU-v� M Mv GMA g7f)z�difflib.unified_diff that can detect "No newline at end of file" as
original "git diff" does.

Based on the same function in Python2.7 difflib.py
FNT�	�z--- z+++ r���r���z@@ -z +z @@�equalr)r<�deleters
\ No newline at end of file
�-)r<�insert�+)r�get_grouped_opcodesr@rrL)�a�b�fromfile�tofile�fromfiledate�
tofiledate�n�lineterm�
tree_encoding�output_encoding�started�group�fromdate�todate�first�last�file1_range�file2_range�tag�i1�i2�j1�j2�lines                        r9�unified_diffrrus����"�G� ��q�,�@�@��C����G�.:��L�>�*��H�*4�r�*��&�"�F������7�8��
�8�*�M�T�T���
�����}�5�6�v�h�x�j�I�P�P���
��A�h��b�	�t�+�E�!�H�d�1�g�>��+�E�!�H�d�1�g�>���[�M��K�=��H�:�>�E�E�o�V�V�#(��C��R��R��g�~��b��H�D���+�%�%���+�+��b��H�D����9��-�� C�C����+�%�%��+�+��b��H�D����9��-�� C�C����+�%�%�$)�#D�s�D3E$�9+E$c��SUS[;$)zqSee if the first few bytes contain any null characters.

Args:
  content: Bytestring to check for binary content
�N)�FIRST_FEW_BYTES��contents r9�	is_binaryrx�s���G�,�_�-�-�-rDc��UcgUSS$)Ns0000000�rG)�hexshas r9�shortidr|�s��
�~���b�q�z�rDc��UcgUS-U-$)Ns	/dev/null�/rG)r6�roots  r9�patch_filenamer��s���y���d�{�Q��rD�storec��^�UupVnUup�n
[US5n[US5nU4Sjn
SnUR[XX4Xi4Xz455 U
"Xg5nU
"X�5nU(dT[UR5(d[UR5(a SU-S-U-S-nURU5 gUR[
U"U5U"U5UU55 g)	alWrite the diff for an object.

Args:
  f: File-like object to write to
  store: Store to retrieve objects from, if necessary
  old_file: (path, mode, hexsha) tuple
  new_file: (path, mode, hexsha) tuple
  diff_binary: Whether to diff files even if they
    are considered binary files by is_binary().

Note: the tuple elements should be None for nonexistent files
�a�bc�>�Uc[R"S5$[U5(a[R"SU-S-5$TU$)NrDsSubproject commit r)r
�from_stringr	)�moder{r�s  �r9rw�"write_object_diff.<locals>.content�sJ����>��#�#�C�(�(�
��
�
��#�#�$9�F�$B�U�$J�K�K���=� rDc�4�U(d/$UR5$�N�rArvs r9�lines� write_object_diff.<locals>.lines�s����I��%�%�'�'rDs
Binary files s and s differ
N)r��
writelines�gen_diff_headerrx�datar rr)r/r��old_file�new_file�diff_binary�old_path�old_mode�old_id�new_path�new_mode�new_id�patched_old_path�patched_new_pathrwr��old_content�new_content�binary_diffs `                r9�write_object_diffr��s����$,� �X��#+� �X��%�h��5��%�h��5��!�(��L�L���,�x�.B�V�DT�U���(�+�K��(�+�K��I�k�&6�&6�7�7�9�[�EU�EU�;V�;V���
��
��
��	
�	�	
�����	�����k�"��k�"� � �	
�	
rDc#�# �Uup4UupVUupxUcUbUnUcUbUn[US5n[US5nSU-S-U-S-v� XV:waOUb4UbSUSS	3RS
5v� SUSS	3RS
5v� OSUSS	3RS
5v� S
[U5-S-[U5-v� UbUbSUS3RS
5v� Sv� g7f)z�Write a blob diff header.

Args:
  paths: Tuple with old and new path
  modes: Tuple with old and new modes
  shas: Tuple with old and new shas
Nr�r�sdiff --git rrzold file mode �o�
rznew file mode zdeleted file mode sindex s..r>)r�rr|)	�paths�modes�shasr�r�r�r��old_sha�new_shas	         r9r�r��s ���!��X� ��X���W���H�0�����H�0����h��-�H��h��-�H�
�8�
#�d�
*�X�
5��
=�=������#�'���|�2�6�>�>�w�G�G�#�H�Q�<�r�2�:�:�7�C�C�'���|�2�6�>�>�w�G�G�
�g�g�&�
&��
.���1A�
A�A���� 4��8�A�,��'�'��0�0�
�K�s�CCc��Uup4nUupgn[US5n	[US5n
SnUR[X64XG4[USS5[USS5455 U"U5nU"U5n
UR[	X�X�55 g)z�Write blob diff.

Args:
  f: File-like object to write to
  old_file: (path, mode, hexsha) tuple (None if nonexisting)
  new_file: (path, mode, hexsha) tuple (None if nonexisting)

Note: The use of write_object_diff is recommended over this function.
r�r�c�,�UbUR5$/$r�r�)�blobs r9r��write_blob_diff.<locals>.lines,s�����?�?�$�$��IrDr!N)r�r�r�rrr)r/r�r�r�r��old_blobr�r��new_blobr�r�r��old_contents�new_contentss              r9�write_blob_diffr�s���&.�"�X��%-�"�X��%�h��5��%�h��5����L�L��
� �
� �
�X�t�T�
*�G�H�d�D�,I�J�	
����?�L���?�L��L�L��\�1A�T�rDc	�n�URX#5nUHuupgup�up�[UUXhU
4XyU4US9 M  g)z�Write tree diff.

Args:
  f: File-like object to write to.
  old_tree: Old tree id
  new_tree: New tree id
  diff_binary: Whether to diff files even if they
    are considered binary files by is_binary().
)r�N)�tree_changesr�)r/r��old_tree�new_treer��changes�oldpath�newpath�oldmode�newmode�oldsha�newshas            r9�write_tree_diffr�@sQ��� � ��4�G�DK�@���.�W�0@���
��
�v�&�
�v�&�#�	
�ELrDr/rc�b�U=(d
 [USS5nU=(d SnUR5n[U[5(a0[R
R
5nURU5nO/[R
R5nURU5n[XA5$)z�Parse a git-am-style patch and split it up into bits.

Args:
  f: File-like object to parse
  encoding: Encoding to use when creating Git objects
Returns: Tuple with commit object, diff contents and git version
rr)r�readr�bytes�email�parser�BytesParser�
parsebytes�Parser�parsestr�parse_patch_message)r/rr1�bparser�msg�uparsers      r9�git_am_patch_splitr�Us����:�7�1�j�'�:�H��"�7�H��v�v�x�H��(�E�"�"��,�,�*�*�,��� � ��*���,�,�%�%�'�����x�(���s�-�-rDc�N�[5nUSRU5UlUSRU5UlUSR	S5nUSR	SU5nUSUS-SnUR
SS5S-RU5UlS	nURS	S
9nURS	5n[U5n	U	H{n
U
S:Xa OtU(aTU
RS5(a"U
[S5SR5UlOU=RS
U
--
slSnMfU=RU
-
slM} SnU	Hn
U
S:Xa OX�-
nM [U	5RS
5nX+U4$![
a	 USnGNf=f![a SnN(f=f)z�Extract a Commit object and patch from an e-mail message.

Args:
  msg: An email message (email.message.Message)
  encoding: Encoding to use to encode Git commits
Returns: Tuple with commit object, diff contents and git version
�from�subjectz[PATCHrrQNr�rOT)r@rrrFrDr)rrr%�	committer�index�
ValueErrorr<r'�get_payloadrA�iter�
startswith�len�rstrip�next�
StopIteration)
r�r�c�patch_tag_start�closer�rh�bodyr��	line_iterrq�diffr3s
             r9r�r�is���	��A��6�{�!�!�(�+�A�H��f�+�$�$�X�.�A�K�.��i�.�.�.�x�8���I��$�$�T�?�;���i�.�����-������r�*�T�1�9�9�(�C�A�I��E��?�?�$�?�'�D��O�O�D�!�E��U��I����8�������y�)�)���I�� 0�1�8�8�:����	�	�U�T�\�)�	��E�
�I�I���I���D����8���������y�/�(�(��/��
�G����A�!��i�.��!��<�����s#�E?�!F�?F�F�F$�#F$)NN)r
N)rOrOrOrOrRr��utf-8r�)Fr�) �__doc__�email.parserr�r"�difflibr�typingrrrr�objectsr	r
r�packrrur:rCrrLrrrxr|r�r�r�r�r�r�r�rGrDr9�<module>r�s���,���#�4�4�.�.�!���;?�32�	�32�l5�	#�#�	#��
����
���1&�h.���@E�8
��8
�	�8
�x�B �F
�*.�%��� 0�1�.�X�c�]�.�(-rD

Youez - 2016 - github.com/yon3zu
LinuXploit