403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g�P���SSKrSSKrSSKJr SSKJr SSKJr Sr"SS\5r	"S	S
\5r
"SS\	5r"S
S\	5r"SS\5r
"SS\	5rSrSrSr"SS5r"SS\5r"SS\5r"SS\5rSrSrS rS!r"S"S#5rS7S$jr"S%S&5r"S'S(\5rS7S)jrS8S*\\S+\S,\4S-jjr S*\\S.\\4S/jr!S8S0jr"S1r#S2r$S3r%S9S4jr&"S5S65r'g):�N)�Iterator)�Optional�)�BzrErrors"Binary files (.*) and (.*) differ
c��\rSrSrSrSrg)�PatchSyntax�z#Base class for patch syntax errors.�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r
��0/usr/lib/python3/dist-packages/breezy/patches.pyrrs��-rrc��\rSrSrSrSrSrg)�BinaryFiles� z!Binary files section encountered.c��XlX lg�N)�	orig_name�mod_name)�selfrrs   r�__init__�BinaryFiles.__init__#s��"�� �
r)rrN�rrr
r�_fmtrrr
rrrr s��.�D�!rrc��\rSrSrSrSrSrg)�MalformedPatchHeader�(z*Malformed patch header.  %(desc)s
%(line)rc��XlX lgr��desc�line�rr$r%s   rr�MalformedPatchHeader.__init__+����	��	rr#Nrr
rrr r (s��8�D�rr c��\rSrSrSrSrSrg)�
MalformedLine�0z"Malformed line.  %(desc)s
%(line)rc��XlX lgrr#r&s   rr�MalformedLine.__init__3r(rr#Nrr
rrr*r*0s��0�D�rr*c��\rSrSrSrSrSrg)�
PatchConflict�8zwText contents mismatch at line %(line_no)d.  Original has "%(orig_line)s", but patch says it should be "%(patch_line)s"c�h�XlURS5UlURS5Ulg)N�
)�line_no�rstrip�	orig_line�
patch_line)rr3r5r6s    rr�PatchConflict.__init__>s+����"�)�)�$�/���$�+�+�D�1��r)r3r5r6Nrr
rrr/r/8s��	H�	�
2rr/c��\rSrSrSrSrSrg)�MalformedHunkHeader�Dz)Malformed hunk header.  %(desc)s
%(line)rc��XlX lgrr#r&s   rr�MalformedHunkHeader.__init__Gr(rr#Nrr
rrr9r9Ds��7�D�rr9c��[U5n[R"[U5nUb*[	URS5URS55eUR
S5(d[SU5eUSSRS5nURS5up4[U5nUR
S
5(d[S5eUSSRS5nURS5upVX44XV44$![a SnNif=f![a
 [SS	5ef=f![a SnN@f=f![a
 [SS	5ef=f)
Nr��--- zNo orig name��
�	zNo orig line�s+++ zNo mod namezNo mod line)
�next�re�match�binary_files_rer�group�
startswithr r4�split�
ValueError�
StopIterationr)�
iter_linesr%rFr�orig_tsr�mod_tss       r�get_patch_namesrPLsQ���
��D�
7�����$�/�����e�k�k�!�n�e�k�k�!�n�=�=����w�'�'�&�~�t�<�<��Q�R�����.�I�
�'0���u�'=�$��
6��J������w�'�'��m�,�,��A�B�x���u�-�H�
�%-�^�^�E�%:�"��
� �8�"4�5�5��!�
���
���7�"�>�2�6�6�7���
���
���6�"�=�"�5�5�6�sU�A>D�C:� AD8�!D&�:D	�D�D	�	D�D#�&D5�2D8�4D5�5D8�8Ec��URS5n[U5S:XaUSnSnOUup#[U5n[U5nX$4$)z�Parse a patch range, handling the "1" special-case.

:param textrange: The text to parse
:type textrange: str
:return: the position and range, as a tuple
:rtype: (int, int)
�,rr�1)rJ�len�int)�	textrange�tmp�pos�brange�ranges     r�parse_ranger[ksL���/�/�$�
�C�
�3�x�1�}��!�f�����
��

�c�(�C���K�E��<�rc�f�SSKnUR"SU5nUc[SU5eURS5R	S5up4URS5(aURS5(d[SU5e[USS5upg[USS5up�U	S:dUS:a[S	U5eURS
5n
[XgX�U
5$![
[4an[[U5U5eSnAff=f![
[4an[[U5U5eSnAff=f)Nrs\@\@ ([^@]*) \@\@( (.*))?\nzDoes not match format.r� �-�+z"Positions don't start with + or -.zHunk range is negative�)rErFr9rHrJrK�
IndexError�strrIr[�Hunk)r%rE�matches�orig�mod�e�orig_pos�
orig_range�mod_pos�	mod_range�tails           r�hunk_from_headerrm~s*��
��h�h�6��=�G���!�":�D�A�A�0��m�m�A�&�,�,�T�2����?�?�4� � ����t�(<�(<�!�"F��M�M�0�!,�T�!�"�X�!6���*�3�q�r�7�3����1�}�
�Q��!�":�D�A�A��=�=���D���g�$�?�?��
�
�#�0�!�#�a�&�$�/�/��0��
�
�#�0�!�#�a�&�$�/�/��0�s/�"C� D�D�)C>�>D�D0�D+�+D0c�&�\rSrSrSrSrSrSrg)�HunkLine�c��Xlgr��contents�rrss  rr�HunkLine.__init__�s�� �
rc�~�URRS5(d
S[-nOSnXR-U-$)NrAr)rs�endswith�NO_NL)r�leadchar�
terminators   r�get_str�HunkLine.get_str�s:����}�}�%�%�e�,�,����J��J��-�-�'�*�4�4rc��[er)�NotImplementedError�rs r�as_bytes�HunkLine.as_bytes�s��!�!rrrN)rrr
rrr{r�rr
rrroro�s��!�5�"rroc� �\rSrSrSrSrSrg)�ContextLine�c�.�[RX5 gr�rorrts  rr�ContextLine.__init__�������$�)rc�$�URS5$)Nr]�r{rs rr��ContextLine.as_bytes�����|�|�D�!�!rr
N�rrr
rrr�rr
rrr�r�����*�"rr�c� �\rSrSrSrSrSrg)�
InsertLine�c�.�[RX5 grr�rts  rr�InsertLine.__init__�r�rc�$�URS5$)Nr_r�rs rr��InsertLine.as_bytes�r�rr
Nr�r
rrr�r��r�rr�c� �\rSrSrSrSrSrg)�
RemoveLine�c�.�[RX5 grr�rts  rr�RemoveLine.__init__�r�rc�$�URS5$)Nr^r�rs rr��RemoveLine.as_bytes�r�rr
Nr�r
rrr�r��r�rr�s\ No newline at end of file
zno-returnvaluesc�4�URS5(a[U5$URS5(a[USS5$URS5(a[USS5$URS5(a[USS5$[	SU5e)NrAr]rr_r^zUnknown line type)rIr�r�r�r*)r%s r�
parse_liner��s������u����4� � �	
����	�	��4���8�$�$�	
����	�	��$�q�r�(�#�#�	
����	�	��$�q�r�(�#�#��/��6�6rrCc�@�\rSrSrS
SjrSrSrSr\rSr	Sr
S	rg)rc��Nc�N�XlX lX0lX@lXPl/Ulgr)rhrirjrkrl�lines)rrhrirjrkrls      rr�
Hunk.__init__�s"�� �
�$����"���	���
rc���URcSnOSUR-nSURURUR5URURUR
5U4-$)Nrr]s@@ -%s +%s @@%s
)rl�	range_strrhrirjrk)r�tail_strs  r�
get_header�Hunk.get_header�s`���9�9���H��d�i�i�'�H�#��N�N�4�=�=�$�/�/�:��N�N�4�<�<����8��'
�
�	
rc�$�US:XaSU-$SX4-$)z�Return a file range, special-casing for 1-line files.

:param pos: The position in the file
:type pos: int
:range: The range in the file
:type range: int
:return: a string in the format 1,4 except when range == pos == 1
rs%is%i,%ir
)rrXrZs   rr��Hunk.range_str�s"���A�:��3�;���s�l�*�*rc��UR5/nURH"nURUR55 M$ SR	U5$�Nr)r�r��appendr��join)rr�r%s   rr��
Hunk.as_bytes�s?�����"�#���J�J�D��L�L�����)���x�x���rc��XRS-
:agXRUR-:�aURUR-
$URU5$�Nrr)rhrirk�shift_to_mod_lines)rrXs  r�shift_to_mod�Hunk.shift_to_mod�sK������"�"��
�=�=�4�?�?�2�
2��>�>�D�O�O�3�3��*�*�3�/�/rc��URS-
nSnURHgn[U[5(aUS-
nOA[U[5(aX!:Xa gUS-nUS-
nO[U[
5(aUS-
nX!:�dMf U$ U$r�)rhr��
isinstancer�r�r�)rrX�position�shiftr%s     rr��Hunk.shift_to_mod_liness����=�=�1�$�����J�J�D��$�
�+�+���
���D�*�-�-��?����
���A�
���D�+�.�.��A�
���~������r)r�rjrkrhrirlr)rrr
rrr�r�r��	__bytes__r�r�rr
rrrcrc�s'���	
�+���I�0�rrcc#�# �SnUH�nUS:XaUbUv� SnMUbUv� [U5nSnSnXBR:dXRR:dMK[	[U55nURRU5 [U[[45(aUS-
n[U[[45(aUS-
nXBR:aM�XRR:aM�M� UbUv� gg![a U(a gef=f7f)a:arg iter_lines: iterable of lines to parse for hunks
:kwarg allow_dirty: If True, when we encounter something that is not
    a hunk header when we're looking for one, assume the rest of the lines
    are not part of the patch (comments or other junk).  Default False.
NrArr)rmr9rirkr�rDr�r�r�r�r�r�)rM�allow_dirty�hunkr%�	orig_size�mod_size�	hunk_lines       r�
iter_hunksr�s����D����5�=����
�������J�	�#�D�)�D��	����/�/�)�X���-F�"�4�
�#3�4�I��J�J���i�(��)�j�+�%>�?�?��Q��	��)�j�+�%>�?�?��A�
��
�/�/�)�X���-F�'�4���
���!#�	����
	�s:� D	�C0� D	�A>D	�D	�#
D	�0D�D	�D�D	c� �\rSrSrSrSrSrg)�BinaryPatchi;c��XlX lgr��oldname�newname)rr�r�s   rr�BinaryPatch.__init__<s�����rc�8�SURUR4-$)NsBinary files %s and %s differ
r�rs rr��BinaryPatch.as_bytes@s��1�T�\�\�4�<�<�4P�P�Pr)r�r�Nr�r
rrr�r�;s
���Qrr�c�R�\rSrSrSSjrSr\S5rSrSr	Sr
S	rS
rSr
g)
�PatchiDNc�V�[RXU5 X0lX@l/Ulgr)r�r�oldts�newts�hunks)rr�r�r�r�s     rr�Patch.__init__Es#�����T�G�4��
��
���
rc��UR5nUSRURVs/sHo"R5PM sn5-
nU$s snfr�)r�r�r�r�)r�ret�hs   rr��Patch.as_bytesKsB���o�o����s�x�x�t�z�z�:�z�!����z�:�;�;���
��;s�A
c�6�US-U-nUbUSU--
nUS-
nU$)Nr]s	%srAr
)�cls�start�name�ts�ls     r�_headerline�Patch._headerlinePs1���D�L�4���
�>�
��2���A�	�U�
���rc��URSURUR5URSURUR5-$)Ns---s+++)r�r�r�r�r�rs rr��Patch.get_headerXsC���������d�j�j�A�D�DT�DT��D�L�L�$�*�*�E
�
�	
rc���SnSnURHNnURH;n[U[5(aUS-
nM[U[5(dM6US-
nM= MP X![UR54$)z,Calculate the number of inserts and removes.rr)r�r�r�r�r�rT)r�removes�insertsr�r%s     r�stats_values�Patch.stats_values]si�������J�J�D��
�
���d�J�/�/��q�L�G���j�1�1��q�L�G�	#���#�d�j�j�/�2�2rc�>�UR5upnUSUSUS3$)z$Return a string of patch statistics.z
 inserts, z removes in z hunks)r�)rr�r�r�s    r�	stats_str�Patch.stats_stris.��$(�$5�$5�$7�!��5���*�W�I�\�%���G�Grc�d�UnURHnURU5nUc gX$-
nM U$r)r�r�)rr��newposr�r�s     r�
pos_in_mod�Patch.pos_in_modns;�����J�J�D��%�%�h�/�E��}���O�F�	�
�
rc#��# �URH`nURS-
nURH>n[U[5(a
X#4v� US-
n[U[
5(dM9US-
nM@ Mb g7f)zlIteraties through inserted lines.

:return: Pair of line number, line
:rtype: iterator of (int, InsertLine)
rN)r�rjr�r�r�r�)rr�rXr%s    r�
iter_inserted�Patch.iter_insertedwse����J�J�D��,�,��"�C��
�
���d�J�/�/��+�%��1�H�C��d�K�0�0��1�H�C�#��s�A A4�&A4)r�r�r�)NN)rrr
rrr��classmethodr�r�r�r�r�r�rr
rrr�r�Ds:����
����
�

3�H�
�
rr�c�"�[U5n[U5uup#upE[X$X55n[X5HnURRU5 M  U$![a*n[URUR5sSnA$SnAff=f)z�:arg iter_lines: iterable of lines to parse
:kwarg allow_dirty: If True, allow the patch to have trailing junk.
    Default False.
N)
�iter_lines_handle_nlrPr�r�r�r�rr�rr)	rMr�rrNrrO�patchr�rgs	         r�parse_patchr��s���
&�j�1�J��5D�Z�5P�2�	�)�1���i�7�;���z�7�D��K�K���t�$�8����
�4��1�;�;��
�
�3�3��4�s�A�
B�$B	�B�	BrMr��
keep_dirtyc#��# �[R"[5n/n/nSnSnUGH�nURS5(aVU(aU(aO4[	U5S:�a%U(a[	U5S:�a	XES.v� /nOUv� /nURU5 MpURS5(aM�URS5(aM�US:�a2URS5(dURS5(aUS	-nO�URS
5(dUR
U5(aFU(a
U(aSnO2[	U5S:�a#U(a[	U5S:�a	XES.v� /nOUv� /nO-URS5(a[U5n	U	RnURU5 GM� [	U5S:�a"U(a[	U5S:�aXES.v� g
Uv� g
g
7f)ax:arg iter_lines: iterable of lines to parse for patches
:kwarg allow_dirty: If True, allow comments and other non-patch text
    before the first patch.  Note that the algorithm here can only find
    such text before any patches have been found.  Comments after the
    first patch are stripped away in iter_hunks() if it is also passed
    allow_dirty=True.  Default False.
rTs=== )�saved_lines�
dirty_heads*** �#r^r]rr?Fs@@N)	rE�compilerGrIrTr�rFrmri)
rMr�r��regexr�r�ri�	beginningr%r�s
          r�iter_file_patchr��s����
�J�J��'�E�!�K� �J��J��I����?�?�7�#�#��y���[�!�A�%��#�j�/�A�"5�*5�P�P�!#�J�%�%� �����d�#���?�?�7�#�#���?�?�4� � ��
�!�^����t�$�$�����(=�(=��a��
��
�_�_�W�
%�
%����T�):�):��y�"�	��[�!�A�%��#�j�/�A�"5�*5�P�P�!#�J�%�%��K�
�_�_�U�
#�
#�#�D�)�D����J����4� �O�P�;��!���#�j�/�A�-�"-�H�H���	�s�G$G&�returnc#�# �SnUH@nU[:Xa*UbURS5(d
[5eUSSnSnUbUv� UnMB UbUv� gg7f)z�Iterates through lines, ensuring that lines that originally had no
terminating \n are produced without one.  This transformation may be
applied at any point up until hunk line parsing, and is safe to apply
repeatedly.
NrA���)rxrw�AssertionError)rM�	last_liner%s   rr�r��sn���"&�I����5�=�� �	�(:�(:�5�(A�(A�$�&�&�!�#�2��I��D�� ��O��	�������s�AAc#�# �[XU5H/nSU;a[USU5USS.v� M"[X15v� M1 g7f)aE:arg iter_lines: iterable of lines to parse for patches
:kwarg allow_dirty: If True, allow text that's not part of the patch at
    selected places.  This includes comments before and after a patch
    for instance.  Default False.
:kwarg keep_dirty: If True, returns a dict of patches with dirty headers.
    Default False.
r�r�)r�r�N)r�r�)rMr�r��patch_liness    r�
parse_patchesr�sQ���'�z�
�K���;�&�)��]�)C�[�Q�"-�l�";��
��k�7�7�L�s�AAc��[U5n[U5U:a[U5n[U5HnXX:wdMUs $ g)aFind the indext of the first character that differs between two texts.

:param atext: The first text
:type atext: str
:param btext: The second text
:type str: str
:return: The index, or None if there are no differences within the range
:rtype: int or NoneType
N)rTrZ)�atext�btext�length�is    r�difference_indexr
sF����Z�F�
�5�z�F���U���
�6�]���8�u�x���H��rc�j�[[U55n[U5 [U[	U55$)zxIterate through a series of lines with a patch applied.
This handles a single file, and does exact, not fuzzy patching.
)r��iterrP�iter_patched_from_hunksr�)�
orig_linesrs  r�iter_patchedrs-��'�t�K�'8�9�K��K� �"�:�z�+�/F�G�Grc	#�# �/nSnUb[U5nUGHnX4R:a%[U5nUv� US-
nX4R:aM%URH�nUR	UR
5 [
U[5(aUR
v� MC[
U[[45(dM`[U5nXVR
:wa[X5SRU55e[
U[5(aUv� O [
U[5(d[U5eUS-
nM� GM UbUShv�N ggN7f)z�Iterate 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.
rNr)
rrhrDr�r�rsr�r�r�r�r/r�r)rr��
seen_patchr3r�r5r�s       rr
r
!s ����J��G����*�%�
����
�
�%��Z�(�I��O��q�L�G��
�
�%����I����i�0�0�1��)�Z�0�0��(�(�(��I��Z�'@�A�A� ��,�	�� 2� 2�2�'��C�H�H�Z�<P�Q�Q��i��5�5�#�O�%�i��<�<�,�Y�7�7��1���$��&�������s �AE	�A(E	�;BE	�E�E	c	��SnSSKJn UGHFnURS:XaSnSnO]U"URR55nUR	U5nUR
R
U5nURU5 URS:wdM�U"URR55n	[URS5UR5n
Uce[RRU	5nURnUSS	HnUR!X�5nM UR#US	XjU"U	5S
9 GM5UR%X�5 GMI g)z�Apply patches to a TreeTransform.

:param tt: TreeTransform instance
:param patches: List of patches
:param prefix: Number leading path segments to strip
c�H�SRURS5SS5$)N�/r)r�rJ)�ps r�strip_prefix�#apply_patches.<locals>.strip_prefixKs ���x�x������Q�R�(�)�)rr)�gen_file_ids	/dev/nullNrTrr�)�file_id)�breezy.bzr.generate_idsrr��decode�trans_id_tree_path�_tree�
get_file_text�delete_contentsr�r
�
splitlinesr��os�pathrJ�root�
new_directory�new_file�create_file)
�tt�patches�prefixrrr��trans_id�
orig_contentsr�r��new_contents�parts�parts
             r�
apply_patchesr/Cs*��*�4����=�=�L�(��H��M�"�5�=�=�#7�#7�#9�:�G��,�,�W�5�H��H�H�2�2�7�;�M����x�(��=�=�L�(�"�5�=�=�#7�#7�#9�:�G�2��(�(��.�����L������
�
�g�.���7�7��!�!�B�K�D�!�/�/��?�H�(�����"�I�x�{�7�?S������|�6�1rc�.�\rSrSrSrSSjrSrSrSrg)	�AppliedPatchesilz<Context that provides access to a tree with patches applied.c�(�XlX lX0lgr)�treer(r))rr3r(r)s    rr�AppliedPatches.__init__os���	����rc���URR5Ul[URURUR
S9 URR
5$)N)r))r3�preview_transform�_ttr/r(r)�get_preview_treers r�	__enter__�AppliedPatches.__enter__tsA���9�9�.�.�0����d�h�h����T�[�[�A��x�x�(�(�*�*rc�8�URR5 g)NF)r7�finalize)r�exc_type�	exc_value�exc_tbs    r�__exit__�AppliedPatches.__exit__ys��������r)r7r(r)r3N�r)	rrr
rrrr9r@rr
rrr1r1ls��F��
+�
rr1)F)FFrB)(r!rE�collections.abcr�typingr�errorsrrGrrr r*r/r9rPr[rmror�r�r�rx�
__pychecker__r�rcr�r�r�r��bytes�boolr�r�rr
rr
r/r1r
rr�<module>rIsZ��$
�	�$���8��.�(�.�!�(�!��;���K��	2�H�	2��+��6�>�&@�."�"�""�(�"�"��"�"��"�	*��!�
�
7��
�A�A�H"�JQ�Q�@�K�@�F�$PU�A����A�.2�A�HL�A�H�X�e�_���%���*8�(�&H��D&7�R�r

Youez - 2016 - github.com/yon3zu
LinuXploit