403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
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/bzr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g�F��`�%Sr/SQrSSKrSSKJr SSKJrJrJrJ	r	J
r
JrJrJ
r
 SSKJr SS	KJrJr "S
S\R$5rSrS
r\R,"S5r\R,"S5rSSSSSS.r\4Sjr\4Sjr0r\\\\4\4\ S'\4Sjr!Sr"SSjr#SSjr$Sr%g)zXML externalization support.)
�Element�ElementTree�
SubElement�
XMLSerializer�escape_invalid_chars�
fromstring�fromstringlist�get_utf8_or_ascii�serialize_inventory_flat�tostring�tostringlist�unpack_inventory_entry�unpack_inventory_flat�N)�Union)rr�
ParseErrorrrrrr�)�
lazy_regex�)�	inventory�
serializerc�J�\rSrSrSrSrSSjrS
SjrSrSr	S	r
S
rSrg)r�:z*Abstract XML object serialize/deserialize.TNc��UR[U5UUUS9$![a$n[R"[U55eSnAff=f)a�Read xml_string into an inventory object.

:param chunks: The xml to read.
:param revision_id: If not-None, the expected revision id of the
    inventory. Some serialisers use this to set the results' root
    revision. This should be supplied for deserialising all
    from-repository inventories so that xml5 inventories that were
    serialised without a revision identifier can be given the right
    revision id (but not for working tree inventories where users can
    edit the data without triggering checksum errors or anything).
:param entry_cache: An optional cache of InventoryEntry objects. If
    supplied we will look up entries via (file_id, revision_id) which
    should map to a valid InventoryEntry (File/Directory/etc) object.
:param return_from_cache: Return entries directly from the cache,
    rather than copying them first. This is only safe if the caller
    promises not to mutate the returned inventory entries, but it can
    make some operations significantly faster.
)�entry_cache�return_from_cacheN)�_unpack_inventoryrrr�UnexpectedInventoryFormat�str)�self�lines�revision_idrr�es      �;/usr/lib/python3/dist-packages/breezy/bzr/xml_serializer.py�read_inventory_from_lines�'XMLSerializer.read_inventory_from_lines?sW��*	?��)�)��u�%��'�"3�	*��
���	?��6�6�s�1�v�>�>��	?�s��
A�A�Ac���URURU5SS9UR5 $!UR5 f=f![a$n[R
"[
U55eSnAff=f)N)r!)r�
_read_element�closerrrr)r�fr!r"s    r#�read_inventory�XMLSerializer.read_inventory^sb��	?�
��-�-�d�.@�.@��.C�QU�-�V����	�����	���	?��6�6�s�1�v�>�>��	?�s&�2�A�A�A�
A5�A0�0A5c�B�SRURU55$)N�)�join�write_revision_to_lines)r�revs  r#�write_revision_to_string�&XMLSerializer.write_revision_to_stringgs���x�x��4�4�S�9�:�:r-c�B�URURU55$�N)�_unpack_revisionr'�rr)s  r#�
read_revision�XMLSerializer.read_revisionjs���$�$�T�%7�%7��%:�;�;r-c�6�UR[U55$r4)r5r)r�
xml_strings  r#�read_revision_from_string�'XMLSerializer.read_revision_from_stringms���$�$�Z�
�%;�<�<r-c�4�[5RU5$r4)r�parser6s  r#r'�XMLSerializer._read_elementps���}�"�"�1�%�%r-�)NNFr4)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__�squashes_xml_invalid_charactersr$r*r1r7r;r'�__static_attributes__r@r-r#rr:s0��4�&*�#�LQ�?�>?�;�<�=�&r-rc�<�Ucg[R"SSU5$)z�Escape the XML-invalid characters in a commit message.

:param message: Commit message to escape
:return: tuple with escaped message and number of characters escaped
)Nru[^	

 -퟿-�]+c�`�URS5RS5RS5$)Nr�unicode_escape�ascii)�group�encode�decode)�matchs r#�<lambda>�&escape_invalid_chars.<locals>.<lambda>�s#��e�k�k�!�n�+�+�,<�=�D�D�W�Mr-)�re�subn)�messages r#rrts(�����
�7�7�4�M���r-c�N�UR[LaURS5$U$)a�Return a cached version of the string.

cElementTree will return a plain string if the XML is plain ascii. It only
returns Unicode when it needs to. We want to work in utf-8 strings. So if
cElementTree returns a plain string, we can just return the cached version.
If it is Unicode, then we need to encode it.

:param a_str: An 8-bit string or Unicode as returned by
              cElementTree.Element.get()
:return: A utf-8 encoded 8-bit string.
�utf-8)�	__class__rrM)�a_strs r#r	r	�s$��
���#���|�|�G�$�$��r-s[&<>'"]|[�-�]+u
[&<>'"€-￿]z&amp;z&apos;z&quot;z&lt;z&gt;)�&�'�"�<�>c��XR5$![a  S[UR55S3s$f=f)a4Replace a string of non-ascii, non XML safe characters with their escape.

This will escape both Standard XML escapes, like <>"', etc.
As well as escaping non ascii characters, because ElementTree did.
This helps us remain compatible to older versions of bzr. We may change
our policy in the future, though.
z&#�;)rL�KeyError�ord�rO�_maps  r#�_unicode_escape_replacerd�s@��*��K�K�M�"�"���*��C����
�&�'�q�)�)�*�s��'>�>c���XR5RSS5R5$![a8 SR	SUR5RS555s$f=f)aHEscape utf8 characters into XML safe ones.

This uses 2 tricks. It is either escaping "standard" characters, like "&<>,
or it is handling characters with the high-bit set. For ascii characters,
we just lookup the replacement in the dictionary. For everything else, we
decode back into Unicode, and then use the XML escape code.
rK�replacer-c3�># �UHnS[U5-v� M g7f)s&#%d;N)ra)�.0�uni_chrs  r#�	<genexpr>�'_utf8_escape_replace.<locals>.<genexpr>�s���
�3O��H�s�7�|�#�3O�s��utf8)rLrNrMr`r.rbs  r#�_utf8_escape_replacerm�sj��
��K�K�M�(�(��)�<�=�D�D�F�F���
��x�x�
�38�;�;�=�3G�3G��3O�
�
�	
�
�s�/2�?A4�3A4�_to_escaped_mapc���URU5nUc\[U[5(a)[R	[
U5R
5nO[R	[U5nX!U'U$)z?Encode the string into utf8, and escape invalid XML characters.)	�get�
isinstancer�_unicode_re�subrdrM�_utf8_rerm)�unicode_or_utf8_strrc�texts   r#�encode_and_escaperw�sh���8�8�'�(�D��|��)�3�/�/��?�?�'�)<���f�h�
��<�<� 4�6I�J�D�$(�
 �!��Kr-c�,�[R5 g)z%Clean out the unicode => escaped map.N)rn�clearr@r-r#�_clear_cacherz�s�����r-c�>�URnU"S5nU"S5nUbDUbAXE4nXnU(a"URS:XaUR5$U$UR5$URn[
RRU5(d[SRU55e[U5nUb[U5nU"S5n	U	b[U	5n	US:Xa[
R"XC"S5U	5n
GOkUS:Xa�[
R"XC"S5U	5n
U"S5U
l
U
Rb U
RRS	5U
l
U"S
5S:XaSU
lU"S
5nU=(a [!U5U
lO�US:Xa+[
R$"XC"S5U	5n
U"S5U
lO�US:Xa�[UR(S5nUR(Sn[UR(S5n	[URS55n[URS55n
[
R*"XLX�U
5n
O[,R."U5eXZlUbUbU
R5UW'U
$![a GN7f=f)N�file_id�revision�	directoryzunsupported entry kind {}�	parent_id�name�file�	text_sha1rK�
executable�yesT�	text_size�symlink�symlink_target�tree-reference�reference_revision)rp�kind�copyr`�tagr�InventoryEntry�versionable_kind�AssertionError�formatr	�InventoryDirectory�
InventoryFiler�rMr��intr��
InventoryLinkr��attrib�
TreeReferencer�UnsupportedInventoryKindr})�eltrr�elt_getr|r}�key�	cached_ier�r�ie�vr�r�s              r#r
r
�sp���g�g�G��i� �G��z�"�H�@��8�#7��!��	$�#�(�I�
!��>�>�[�0�$�>�>�+�+� � ��>�>�#�#��7�7�D��#�#�4�4�T�:�:��8�?�?��E�F�F���(�G���$�X�.����$�I���%�i�0�	��{��
�
)�
)�'�7�6�?�I�
N��	
���
�
$�
$�W�g�f�o�y�
I���{�+���
�<�<�#��<�<�.�.�w�7�B�L��<� �E�)� �B�M��K� ���|�S��V���	
��	�
�
$�
$�W�g�f�o�y�
I��#�$4�5���	
�!�	!�#�C�J�J�y�$9�:���z�z�&�!��%�c�j�j��&=�>�	�$�S�W�W�Z�%8�9��.�s�w�w�7K�/L�M��
�
$�
$��9�0B�
���1�1�$�7�7��K���� 7�
�7�7�9��C��
�I��m�	��	�s�J�
J�Jc���URS:wa/[R"SRUR55eUR	S5nUcUcUR5U:wa%[R"SRU55eUR	S5nUbURS5n[R"SUS9nUHnU"X�U5n	URU	5 M U$)	aUnpack a flat XML inventory.

:param elt: XML element for the inventory
:param format_num: Expected format number
:param unpack_entry: Function for unpacking inventory entries
:return: An inventory
:raise UnexpectedInventoryFormat: When unexpected elements or data is
    encountered
rzRoot tag is {!r}r�NzInvalid format version {!r}r!rV)�root_idr!)	r�rrr�rprMr�	Inventory�add)
r��
format_num�unpack_entryrrr�r!�invr"r�s
          r#rrNs����w�w�+���2�2�3E�3L�3L�S�W�W�3U�V�V�
�W�W�X�
�F���:�1�f�m�m�o��6S��2�2�)�0�0��8�
�	
��'�'�-�(�K���!�(�(��1��
�
�
�d��
D�C�
��
�!�*;�
<���������Jr-c���UR5n[U5upgUGHFup�U	RU:wa(SRS[	U	R5S/5n
OSn
U	R
S:Xa�U	R(aSnOSnU(daU"SU[	U	R5[	U	R5U
[	U	R5U	RU	R4-5 M�U"SU[	U	R5[	U	R5U
4-5 GMU	R
S:Xa�U(dKU"S	[	U	R5[	U	R5U
[	U	R54-5 GMhU"S
[	U	R5[	U	R5U
4-5 GM�U	R
S:Xa�U(d_U"S[	U	R5[	U	R5U
[	U	R5[	U	R54-5 GMU"S
[	U	R5[	U	R5U
4-5 GMLU	R
S:Xa�U	R
U;a [R"U	R
5eU(d_U"S[	U	R5[	U	R5U
[	U	R5[	U	R54-5 GM�U"S[	U	R5[	U	R5U
4-5 GM)[R"U	R
5e U"S5 g)aSerialize an inventory to a flat XML file.

:param inv: Inventory to serialize
:param append: Function for writing a line of output
:param working: If True skip history data - text_sha1, text_size,
    reference_revision, symlink_target.    self._check_revisions(inv)
r-s parent_id="�"r�s executable="yes"sP<file%s file_id="%s" name="%s"%s revision="%s" text_sha1="%s" text_size="%d" />
s$<file%s file_id="%s" name="%s"%s />
r~s5<directory file_id="%s" name="%s"%s revision="%s" />
s'<directory file_id="%s" name="%s"%s />
r�sG<symlink file_id="%s" name="%s"%s revision="%s" symlink_target="%s" />
s%<symlink file_id="%s" name="%s"%s />
r�sR<tree-reference file_id="%s" name="%s"%s revision="%s" reference_revision="%s" />
s,<tree-reference file_id="%s" name="%s"%s />
s
</inventory>
N)�iter_entries�nextrr.rwr�r�r|r�r}r�r�r�rr�r�)r��appendr��supported_kinds�working�entries�	root_path�root_ie�_pathr��
parent_strr�s            r#r
r
ks������ �G��g���I��	��
�<�<�7�"���� �"3�B�L�L�"A�4�H��J��J�
�7�7�f���}�}�1�
� �
���:�#�)�"�*�*�5�)�"�'�'�2�"�)�"�+�+�6��������
���<�"�)�"�*�*�5�)�"�'�'�2�"�	����W�W��
#����*�"�*�*�5�)�"�'�'�2�"�)�"�+�+�6�	��	��?�)�"�*�*�5�)�"�'�'�2�"�����W�W�	�
!���0�*�"�*�*�5�)�"�'�'�2�"�)�"�+�+�6�)�"�*;�*;�<���
��=�)�"�*�*�5�)�"�'�'�2�"�����W�W�(�
(��w�w�o�-� �9�9�"�'�'�B�B���B�*�"�*�*�5�)�"�'�'�2�"�)�"�+�+�6�)�"�*?�*?�@���
��D�)�"�*�*�5�)�"�'�'�2�"�����5�5�b�g�g�>�>�Q�R��r-)NF)&rE�__all__rR�typingr�xml.etree.ElementTreerrrrrrrr�rrr�
Serializerrrr	�lazy_compilertrr�_xml_escape_maprdrmrn�dict�bytesr�__annotations__rwrzr
rr
r@r-r#�<module>r�s���"#��� 
��	�	�	��#�7&�J�)�)�7&�t�&�*�"�"�#;�<���%�%�&=�>��
�	�	�	�	���)8�*�&&5�

� 13���e�E�3�J�'��,�-�2�1@��2�
^�DHM��:tr-

Youez - 2016 - github.com/yon3zu
LinuXploit