bg]BdZddlmZddlmZmZdZGddeZGddeZ Gd d e Z Gd d eZ Gd de Z Gdde Z Gdde ZGddeZGddeZGddeZdS)zPModule with basic data structures - they are designed to be lightweight and fast bin_to_hex)type_id_to_type_maptype_to_type_id_map) OInfo OPackInfoODeltaPackInfoOStream OPackStreamODeltaPackStreamIStream InvalidOInfoInvalidOStreamceZdZdZeZdZdZedZ edZ edZ edZ edZ d S) raCarries 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||||fSNtuple__new__)clsshatypesizes [/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/gitdb/base.pyrz OInfo.__new__#s}}S3d"3444c:t|dSrr__init__selfargss rrzOInfo.__init__& trc|dS)z$:return: our sha as binary, 20 bytesrr s rbinshaz OInfo.binsha* Awrc,t|dSz':return: our sha, hex encoded, 40 bytesrrr%s rhexshaz OInfo.hexsha/$q'"""rc|dSNr$r%s rrz OInfo.type4 Awrc(t|dSr-)rr%s rtype_idz OInfo.type_id8"47++rc|dSNr$r%s rrz OInfo.size<r/rN)__name__ __module__ __qualname____doc__r __slots__rrpropertyr&r*rr1rr$rrrrs > >I555X##X#X,,X,XrrceZdZdZeZdZdZedZ edZ edZ edZ 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||||fSrr)r packoffsetrrs rrzOPackInfo.__new__Ls}}S:tT":;;;rc:t|dSrrrs rrzOPackInfo.__init__Or"rc|dSNrr$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$rrrrBsKK I<<< X,,X,XXrrcBeZdZdZeZdZedZdS)r zAdds 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|||||fSrr)rr>rr delta_infos rrzODeltaPackInfo.__new__os}}S:tT:"FGGGrc|dSNr$r%s rrHzODeltaPackInfo.delta_infosr/rN) r6r7r8r9rr:rr;rHr$rrr r gsX**IHHHXrr cPeZdZdZeZdZdZddZe dZ dS) r zBase for object streams retrieved from the database, providing additional information about the stream. Generally, ODB streams are read-only as objects are immutablec@t|||||fSz+Helps with the initialization of subclassesrrrrrstreamr!kwargss rrzOStream.__new__}}S3dF";<<rrrPr!s rrzOPackStream.__new__s}}S:tT6"BCCCrrTc8|d|SrJrVrXs rrWzOPackStream.readrYrc|dSrJr$r%s rrPzOPackStream.streamr/rNr[ r6r7r8r9rr:rrWr;rPr$rrr r sjIDDD """"Xrr cJeZdZdZeZdZddZedZ dS)r zFProvides a stream outputting the uncompressed offset delta informationcBt||||||fSrr)rr>rrrHrPs rrzODeltaPackStream.__new__s!}}S:tT:v"NOOOrrTc8|d|SNrVrXs rrWzODeltaPackStream.readrYrc|dSrhr$r%s rrPzODeltaPackStream.streamr/rNr[rdr$rrr r sfPPIPPP""""Xrr ceZdZdZeZddZddZedZ dZ dZ ee e Z dd Z d Zd ZeeeZd Zd ZeeeZdZdZeeeZdZdZeeeZdS)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'NcBt|||||dfSr)listr)rrrrPrs rrzIStream.__new__s!||C#tT64!@AAArcFt|||||dfdSr)rmr)r rrrPrs rrzIStream.__init__s' dS$fd;<<<<rs WV!!!!!!  8*****E***\        JY$e4     7   ")(~$L,L,L,L,L,dL,L,L,b56\r