ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/gitdb/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/gitdb/__pycache__/base.cpython-311.pyc

�

�܋f]��B�dZddlmZddlmZmZdZGd�de��ZGd�de��Z	Gd	�d
e	��Z
Gd�de��ZGd
�de��ZGd�de	��Z
Gd�de
��ZGd�de��ZGd�de��ZGd�de��ZdS)zPModule with basic data structures - they are designed to be lightweight and fast���
bin_to_hex)�type_id_to_type_map�type_to_type_id_map)	�OInfo�	OPackInfo�ODeltaPackInfo�OStream�OPackStream�ODeltaPackStream�IStream�InvalidOInfo�InvalidOStreamc��eZdZdZe��Zd�Zd�Zed���Z	ed���Z
ed���Zed���Zed���Z
d	S)
ra�Carries information about an object in an ODB, providing information
    about the binary sha of the object, the type_string as well as the uncompressed size
    in bytes.

    It can be accessed using tuple notation and using attribute access notation::

        assert dbi[0] == dbi.binsha
        assert dbi[1] == dbi.type
        assert dbi[2] == dbi.size

    The type is designed to be as lightweight as possible.c�>�t�||||f��S�N��tuple�__new__)�cls�sha�type�sizes    �[/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/gitdb/base.pyrz
OInfo.__new__#s���}�}�S�3��d�"3�4�4�4�c�:�t�|��dSr�r�__init__��self�argss  rrzOInfo.__init__&���
���t�����rc��|dS)z$:return: our sha as binary, 20 bytesr��r s r�binshazOInfo.binsha*�
���A�w�rc�,�t|d��S�z':return: our sha, hex encoded, 40 bytesrrr%s r�hexshazOInfo.hexsha/����$�q�'�"�"�"rc��|dS�N�r$r%s rrz
OInfo.type4����A�w�rc�(�t|dSr-)rr%s r�type_idz
OInfo.type_id8���"�4��7�+�+rc��|dS�N�r$r%s rrz
OInfo.size<r/rN)�__name__�
__module__�__qualname__�__doc__r�	__slots__rr�propertyr&r*rr1rr$rrrrs�������
>�
>�����I�5�5�5��������X���#�#��X�#�����X���,�,��X�,�����X���rrc��eZdZdZe��Zd�Zd�Zed���Z	ed���Z
ed���Zed���ZdS)	ra`As OInfo, but provides a type_id property to retrieve the numerical type id, and
    does not include a sha.

    Additionally, the pack_offset is the absolute offset into the packfile at which
    all object information is located. The data_offset property points to the absolute
    location in the pack at which that actual data stream can be found.c�>�t�||||f��Srr)r�
packoffsetrrs    rrzOPackInfo.__new__Ls���}�}�S�:�t�T�":�;�;�;rc�:�t�|��dSrrrs  rrzOPackInfo.__init__Or"rc��|dS�Nrr$r%s r�pack_offsetzOPackInfo.pack_offsetTr/rc�(�t|dSr-)rr%s rrzOPackInfo.typeXr2rc��|dSr-r$r%s rr1zOPackInfo.type_id\r/rc��|dSr4r$r%s rrzOPackInfo.size`r/rN)
r6r7r8r9rr:rrr;rBrr1rr$rrrrBs�������K�K�����I�<�<�<����
����X���,�,��X�,�����X������X���rrc�B�eZdZdZe��Zd�Zed���ZdS)r	z�Adds delta specific information,
    Either the 20 byte sha which points to some object in the database,
    or the negative offset from the pack_offset, so that pack_offset - delta_info yields
    the pack offset of the base objectc�@�t�|||||f��Srr)rr>rr�
delta_infos     rrzODeltaPackInfo.__new__os���}�}�S�:�t�T�:�"F�G�G�Grc��|dS�N�r$r%s rrHzODeltaPackInfo.delta_infosr/rN)	r6r7r8r9rr:rr;rHr$rrr	r	gsX������*�*�����I�H�H�H�����X���rr	c�P�eZdZdZe��Zd�Zd�Zdd�Ze	d���Z
dS)	r
z�Base for object streams retrieved from the database, providing additional
    information about the stream.
    Generally, ODB streams are read-only as objects are immutablec�@�t�|||||f��S�z+Helps with the initialization of subclassesr�rrrr�streamr!�kwargss       rrzOStream.__new__�����}�}�S�3��d�F�";�<�<�<rc�:�t�|��dSrr)r r!rQs   rrzOStream.__init__�r"r���c�8�|d�|��SrJ��read�r rs  rrWzOStream.read�����A�w�|�|�D�!�!�!rc��|dSrJr$r%s rrPzOStream.stream�r/rN�rT)r6r7r8r9rr:rrrWr;rPr$rrr
r
ysz������E�E�����I�=�=�=����
"�"�"�"�����X���rr
c�.�eZdZdZd�Zed���ZdS)�ODeltaStreamz,Uses size info of its stream, delaying readsc�@�t�|||||f��SrNrrOs       rrzODeltaStream.__new__�rRrc��|djSrJ)rr%s rrzODeltaStream.size�s���A�w�|�rN)r6r7r8r9rr;rr$rrr]r]�sD������6�6�=�=�=�����X���rr]c�J�eZdZdZe��Zd�Zdd�Zed���Z	dS)rz_Next to pack object information, a stream outputting an undeltified base object
    is providedc�@�t�|||||f��SrNr)rr>rrrPr!s      rrzOPackStream.__new__�s���}�}�S�:�t�T�6�"B�C�C�CrrTc�8�|d�|��SrJrVrXs  rrWzOPackStream.read�rYrc��|dSrJr$r%s rrPzOPackStream.stream�r/rNr[�
r6r7r8r9rr:rrWr;rPr$rrrr�sj������������I�D�D�D�
"�"�"�"�����X���rrc�J�eZdZdZe��Zd�Zdd�Zed���Z	dS)rzFProvides a stream outputting the uncompressed offset delta informationc�B�t�||||||f��Srr)rr>rrrHrPs      rrzODeltaPackStream.__new__�s!���}�}�S�:�t�T�:�v�"N�O�O�OrrTc�8�|d�|��S�N�rVrXs  rrWzODeltaPackStream.read�rYrc��|dSrhr$r%s rrPzODeltaPackStream.stream�r/rNr[rdr$rrrr�sf������P�P�����I�P�P�P�"�"�"�"�����X���rrc��eZdZdZe��Zdd�Zdd�Zed���Z	d�Z
d�Zee
e��Zdd	�Z
d
�Zd�Zeee��Zd�Zd
�Zeee��Zd�Zd�Zeee��Zd�Zd�Zeee��ZdS)r
agRepresents an input content stream to be fed into the ODB. It is mutable to allow
    the ODB to record information about the operations outcome right in this instance.

    It provides interfaces for the OStream and a StreamReader to allow the instance
    to blend in without prior conversion.

    The only method your content stream must support is 'read'Nc�B�t�|||||df��Sr)�listr)rrrrPrs     rrzIStream.__new__�s!���|�|�C�#�t�T�6�4�!@�A�A�Arc�F�t�|||||df��dSr)rmr)r rrrPrs     rrzIStream.__init__�s'���
�
�d�S�$��f�d�;�<�<�<�<�<rc�,�t|d��Sr)rr%s rr*zIStream.hexsha�r+rc��|dS)zD:return: the error that occurred when processing the stream, or Nonerir$r%s r�_errorzIStream._error�r/rc��||d<dS)zFSet this input stream to the given exc, may be None to reset the errorriNr$)r �excs  r�
_set_errorzIStream._set_error�s����Q���rrTc�8�|d�|��S)zhImplements a simple stream reader interface, passing the read call on
            to our internal streamrKrVrXs  rrWzIStream.read�s���A�w�|�|�D�!�!�!rc��||d<dSrAr$)r r&s  r�_set_binshazIStream._set_binsha������Q���rc��|dSrAr$r%s r�_binshazIStream._binsha�����A�w�rc��|dSr-r$r%s r�_typez
IStream._typer{rc��||d<dSr-r$)r rs  r�	_set_typezIStream._set_type�����Q���rc��|dSr4r$r%s r�_sizez
IStream._sizer{rc��||d<dSr4r$rXs  r�	_set_sizezIStream._set_sizer�rc��|dSrJr$r%s r�_streamzIStream._streamr{rc��||d<dSrJr$)r rPs  r�_set_streamzIStream._set_streamrxrrr[)r6r7r8r9rr:rrr;r*rqrt�errorrWrwrzr&r}rrr�r�rr�r�rPr$rrr
r
�sw������B�B�����I�B�B�B�B�=�=�=�=��#�#��X�#�������
�H�V�Z�(�(�E�"�"�"�"��������X�g�{�
+�
+�F��������8�E�9�%�%�D��������8�E�9�%�%�D��������X�g�{�
+�
+�F�F�Frr
c�t�eZdZdZe��Zd�Zd�Zed���Z	ed���Z
ed���ZdS)rz�Carries information about a sha identifying an object which is invalid in
    the queried database. The exception attribute provides more information about
    the cause of the issuec�<�t�|||f��Srr)rrrss   rrzInvalidOInfo.__new__"s���}�}�S�3��*�-�-�-rc�@�t�|||f��dSrr)r rrss   rrzInvalidOInfo.__init__%s ��
���t�c�3�Z�(�(�(�(�(rc��|dSrAr$r%s rr&zInvalidOInfo.binsha(r/rc�,�t|d��SrArr%s rr*zInvalidOInfo.hexsha,s���$�q�'�"�"�"rc��|dS)z2:return: exception instance explaining the failurer.r$r%s rr�zInvalidOInfo.error0r'rN)r6r7r8r9rr:rrr;r&r*r�r$rrrrs�������������I�.�.�.�)�)�)�����X���#�#��X�#�����X���rrc�&�eZdZdZe��ZdS)rz/Carries information about an invalid ODB streamN)r6r7r8r9rr:r$rrrr6s������9�9�����I�I�IrrN)r9�
gitdb.utilr�	gitdb.funrr�__all__rrrr	r
r]rrrmr
rrr$rr�<module>r�s��
W�V�!�!�!�!�!�!���������
8��*�*�*�*�*�E�*�*�*�\ � � � � �� � � �J�����Y����$�����e����4�����7����"�����)����(�����~����$L,�L,�L,�L,�L,�d�L,�L,�L,�b�����5����6�����\�����r

Zerion Mini Shell 1.0