/opt/cloudlinux/venv/lib/python3.11/site-packages/gitdb/__pycache__
NameSizeModeActions
base.cpython-311.pyc146260644editdlrm
const.cpython-311.pyc3490644editdlrm
exc.cpython-311.pyc30600644editdlrm
fun.cpython-311.pyc255950644editdlrm
pack.cpython-311.pyc477700644editdlrm
stream.cpython-311.pyc281690644editdlrm
typ.cpython-311.pyc4120644editdlrm
util.cpython-311.pyc162230644editdlrm
__init__.cpython-311.pyc16200644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/gitdb/__pycache__/pack.cpython-311.pyc (47770B)
§ †Ðÿ„¾’ãó¤—dZddlZddlmZmZmZmZddlmZm Z m Z m Z m Z ddl mZmZmZmZmZmZmZmZmZmZmZ ddlmZn #e$rYnwxYwddlmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)dd l*m+Z+dd l,m-Z-dd l.m/Z/ddl0Z0ddl1Z1ddl2Z2ddl3Z3d Z4d „Z5dd„Z6Gd„d¦«Z7Gd„de ¦«Z8Gd„de ¦«Z9Gd„de ¦«Z:dS)z3Contains PackIndexFile and PackFile implementationséN)Ú BadObjectÚAmbiguousObjectNameÚUnsupportedOperationÚ ParseError)ÚmmanÚ LazyMixinÚ unpack_fromÚ bin_to_hexÚbyte_ord) Úcreate_pack_object_headerÚpack_object_header_infoÚis_equal_canonical_shaÚtype_id_to_type_mapÚ write_objectÚ stream_copyÚ chunk_sizeÚ delta_typesÚ OFS_DELTAÚ REF_DELTAÚmsb_size©ÚPackIndexFile_sha_to_index)ÚOInfoÚOStreamÚ OPackInfoÚ OPackStreamÚ ODeltaStreamÚODeltaPackInfoÚODeltaPackStream)ÚDecompressMemMapReaderÚDeltaApplyReaderÚ Sha1WriterÚ NullStreamÚFlexibleSha1Writer)Úpack)Úcrc32)Ú NULL_BYTE)Ú PackIndexFileÚPackFileÚ PackEntitycój—| |¦« ¦«}t|¦«\}}}d}d}|tkrZ|} t || ¦«} | dz } | dz} | dzr/t || ¦«} | dz } | dz } | dz| dzz} | dz°/| }| }n|t kr|dz}|||…}n|}||z} |rDt ||d…d|¦«} |€| t|||| ¦«fS| t||||| ¦«fS|€| t|||¦«fS| t||||¦«fS)a& :return: Tuple(abs_data_offset, PackInfo|PackStream) an object of the correct type according to the type_id of the object. If as_stream is True, the object will contain a stream, allowing the data to be read decompressed. :param data: random accessible data containing all required information :parma offset: offset in to the data at which the object information is located :param as_stream: if True, a stream object will be returned that can read the data, otherwise you receive an info object onlyNééé€ééF) Ú use_regionÚbufferr rr rr rrrr)ÚcursorÚoffsetÚ as_streamÚdataÚtype_idÚ uncomp_sizeÚdata_rela_offsetÚtotal_rela_offsetÚ delta_infoÚiÚcÚ delta_offsetÚabs_data_offsetÚstreams ú\/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/gitdb/pack.pyÚpack_object_atrBLs¯€ð × Ò ˜VÑ $Ô $× +Ò +Ñ -Ô -€DÝ-DÀTÑ-JÔ-JÑ*€Gˆ[Ð*ØÐØ€Jð•)ÒÐØ ˆÝ �T˜!”WÑ Ô ˆØ ˆQ‰ˆØ˜4‘xˆ Ø�$‰hð <ݘ˜aœÑ!Ô!ˆAØ �‰FˆAØ ˜AÑ ˆLØ(¨AÑ-°!°d±(Ñ;ˆLð �$‰hð <ð "ˆ ØÐÐà •IÒ Ð Ø,¨rÑ1ÐØÐ*Ð+<Ð<Ô=ˆ ˆ ð-ÐàÐ0Ñ0€OØð ]Ý'¨Ð->Ð-?Ð-?Ô(@À%ÈÑUÔUˆØ Ð Ø"¥K°¸ÀÈfÑ$UÔ$UÐUÐ Uà"Õ$4°V¸WÀkÐS]Ð_eÑ$fÔ$fÐfÐ fà Ð Ø"¥I¨f°g¸{Ñ$KÔ$KÐKÐ Kà"¥N°6¸7ÀKÐQ[Ñ$\Ô$\Ð\Ð \ócó°—d}d}|du}d}|r|} |t¦«}|t|¦«z }| |¦«} |t| ¦«z }|| ¦«|rt| |¦«}t|¦«tkrnŒ€| ¦«} |t| ¦«z }|| ¦«|rt| |¦«}|||fS)a’Copy a stream as read from read function, zip it, and write the result. Count the number of written bytes and return it :param base_crc: if not None, the crc will be the base for all compressed data we consecutively write and generate a crc32 from. If None, no crc will be generated :return: tuple(no bytes read, no bytes written, crc32) crc might be 0 if base_crc was falserN)rÚlenÚcompressr&Úflush) ÚreadÚwriteÚzstreamÚbase_crcÚbrÚbwÚwant_crcÚcrcÚchunkÚ compresseds rAÚwrite_stream_to_packrR‚s€ð €BØ €BؘtÐ#€HØ €CØð؈ð Ø�•ZÑ Ô ˆØ �c�%‰jŒjшØ×%Ò% eÑ,Ô,ˆ Ø �c�*‰oŒoÑˆØ ˆˆjÑÔÐà ð )ݘ  CÑ(Ô(ˆCõ ˆu‰:Œ:�Ò #Ð #Ø ð ð—’‘”€JØ�#ˆj‰/Œ/Ñ€BØ €Eˆ*ÑÔÐØð%Ý�J Ñ$Ô$ˆð ��Cˆ=ÐrCcó(—eZdZdZdZd„Zd„Zd„ZdS)Ú IndexWriterzœUtility to cache index information, allowing to write all information later in one go to the given stream **Note:** currently only writes v2 indicesÚ_objscó,—t¦«|_dS©N)ÚlistrU©Úselfs rAÚ__init__zIndexWriter.__init__´s€Ý‘V”VˆŒ ˆ ˆ rCcó@—|j |||f¦«dS)z&Append one piece of object informationN)rUÚappend)rZÚbinsharOr4s rAr]zIndexWriter.append·s%€à Œ ×Ò˜6 3¨Ð/Ñ0Ô0Ð0Ð0Ð0rCcóp—|j d„¬¦«t|¦«}|j}|tj¦«|t dtj¦«¦«td¦«}|jD]+}|t|dd¦«xxdz cc<Œ,td¦«D]6}||}|t d|¦«¦«||dzxx|z cc<Œ7|t d|d¦«¦«|d  d „|jD¦«¦«¦«|jD]$}|t d|dd z¦«¦«Œ%t¦«}|jD]V}|d } | d kr*|  | ¦«d t|¦«zdz } |t d| d z¦«¦«ŒW|D]} |t d| ¦«¦«Œt|¦«dksJ‚||¦«| d¬¦«} || ¦«| S)zµWrite the index file using the given write method :param pack_sha: binary sha over the whole pack that we index :return: sha1 binary sha over all index file contentscó—|dS)Nr©)Úos rAúz#IndexWriter.write..Às € a¨¤d€rC)Úkeyú>L(rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr,éÿrCc3ó&K—|] }|dV—Œ dS)rNra)Ú.0Úts rAú z$IndexWriter.write..Õs&èè€Ð4Ð4 A˜1˜Qœ4Ð4Ð4Ð4Ð4Ð4Ð4rCìÿÿéiÿÿÿìú>Qr0F©Úas_hex)rUÚsortr$rIr(Úindex_v2_signaturer%Úindex_version_defaultrXr ÚrangeÚjoinr]rEÚsha) rZÚpack_sharIÚ sha_writerÚ sha_writeÚtmplistrir<ÚvÚofsrvs rArIzIndexWriter.write»s{€ð Œ �Š˜N˜NˆÑ+Ô+Ð+å'¨Ñ.Ô.ˆ ØÔ$ˆ ؈ •-Ô2Ñ3Ô3Ð3؈ •$�t�]Ô@ÑAÔAÑBÔBÐBõ�zÑ"Ô"ˆØ”ð ,ð ,ˆAØ •H˜Q˜qœT !œWÑ%Ô%Ð &Ð &Ô &¨!Ñ +Ð &Ð &Ñ &Ð &å�s‘”ð ð ˆAؘ” ˆAØ ˆI•d˜4 ‘m”mÑ $Ô $Ð $Ø �A˜‘EˆNˆNŒN˜aÑ ˆNˆN‰NˆNàˆ •$�t˜W Sœ\Ñ*Ô*Ñ+Ô+Ð+ð ˆ �#—(’(Ð4Ð4¨¬Ð4Ñ4Ô4Ñ4Ô4Ñ5Ô5Ð5ð”ð 5ð 5ˆAØ ˆI•d˜4  1¤¨ Ñ!2Ñ3Ô3Ñ 4Ô 4Ð 4Ð 4õ‘&”&ˆà”ð 4ð 4ˆAØ�A”$ˆCØ�ZÒÐØ—’˜sÑ#Ô#Ð#Ø ¥3 w¡<¤<Ñ/°!Ñ3�à ˆI•d˜4  zÑ!1Ñ2Ô2Ñ 3Ô 3Ð 3Ð 3ðð 'ð 'ˆCØ ˆI•d˜4 ‘o”oÑ &Ô &Ð &Ð &õ�8‰}Œ} Ò"Ð"Ð"Ð"؈ �(ÑÔÐØ�nŠn EˆnÑ*Ô*ˆØ ˆˆc‰ Œ ˆ ؈ rCN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__r[r]rIrarCrArTrT­sR€€€€€ð2ð2ð€Iðððð1ð1ð1ð6ð6ð6ð6ð6rCrTcó̇—eZdZdZdZdZdZˆfd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zde¦«vrd„ZˆxZSˆxZS)r(zmA pack index provides offsets into the corresponding pack, allowing to find locations for offsets faster.isÿtOcrlcóV•—t¦« ¦«||_dSrW)Úsuperr[Ú _indexpath)rZÚ indexpathÚ __class__s €rAr[zPackIndexFile.__init__s$ø€Ý ‰Œ×ÒÑÔÐØ#ˆŒˆˆrCcóF—tj|j¦«d|_dSrW)rÚforce_map_handle_removal_winr…Ú_cursorrYs rAÚclosezPackIndexFile.closes €Ý Ô)¨$¬/Ñ:Ô:Ð:؈Œ ˆ ˆ rCc ó¢—|dkr(|j ¦«dd…|_dS|dkr(|j ¦«dd…|_dS|dkr»tj|j¦« ¦«|_tj¦«dkrp|j ¦«tj¦«krDtd|j|j ¦«tj¦«fz¦«‚dSdS|j ¦«}|dd…|j krdpd |_ |j dkr/td |d¦«d}||j ks Jd |z¦«‚d D]+}t||t|d ||j fz¦«¦«Œ,| ¦«dS)NÚ_packfile_checksuméØÿÿÿéìÿÿÿrŠrzsThe index file at %s is too large to fit into a mapped window (%i > %i). This is a limitation of the implementationérlr,rezUnsupported index version: %i)Úentryr4rvrOz_%s_v%i)rŠÚmapr�rÚ make_cursorr…r1Ú window_sizeÚ file_sizeÚAssertionErrorrrÚ_versionr ÚsetattrÚgetattrÚ _initialize)rZÚattrÚmmapÚ version_idÚfnames rAÚ _set_cache_zPackIndexFile._set_cache_ sï€Ø Ð'Ò 'Ð 'Ø&*¤l×&6Ò&6Ñ&8Ô&8¸¸S¸Ô&AˆDÔ #Ð #Ð #Ø Ð)Ò )Ð )Ø&*¤l×&6Ò&6Ñ&8Ô&8¸¸¸Ô&>ˆDÔ #Ð #Ð #Ø �YÒ Ð õ Ô+¨D¬OÑ<Ô<×GÒGÑIÔIˆDŒLåÔÑ!Ô! AÒ%Ð%¨$¬,×*@Ò*@Ñ*BÔ*BÅTÔEUÑEWÔEWÒ*WÐ*WÝ$ð&[Ø”O T¤\×%;Ò%;Ñ%=Ô%=½tÔ?OÑ?QÔ?Qð^Sñ&SñTôTðTð&Ð%Ð*WÐ*Wð”<×#Ò#Ñ%Ô%ˆDØ! " 1 "œX¨Ô)@Ò@ÐFÀQÐLÈ1ˆDŒMØŒ} Ò!Ð!Ý(¨¨t°QÑ7Ô7¸Ô:� Ø! T¤]Ò2Ð2Ð2Ð4SÐV`Ñ4`Ñ2Ô2Ð2ð ;ð Xð X�ݘ˜e¥W¨T°9ÀÀtÄ}Ð?UÑ3UÑ%VÔ%VÑWÔWÐWÐWð × Ò Ñ Ô Ð Ð Ð rCcód—td|j ¦«d|dzz¦«dzS)z!:return: tuple(offset, binsha, 0)z>L20séé©r©r rŠr’©rZr<s rAÚ _entry_v1zPackIndexFile._entry_v13s/€å˜7 D¤L×$4Ò$4Ñ$6Ô$6¸¸qÀ2¹v¹ ÑFÔFÈÑNÐNrCcój—td|j ¦«d|dzz¦«dS)zsee ``_offset_v2``rer¡r¢rr¤r¥s rAÚ _offset_v1zPackIndexFile._offset_v17s/€å˜4 ¤×!1Ò!1Ñ!3Ô!3°T¸AÀ¹F±]ÑCÔCÀAÔFÐFrCcó`—d|dzzdz}|j ¦«||dz…S)zsee ``_sha_v2``r¡r¢r�r0©rŠr’©rZr<Úbases rAÚ_sha_v1zPackIndexFile._sha_v1;s5€à�q˜2‘v‰ Ñ"ˆØŒ|×ÒÑ!Ô! $ t¨b¡y .Ô1Ð1rCcó—dS)Ú unsupportedrrar¥s rAÚ_crc_v1zPackIndexFile._crc_v1@s€àˆqrCcó~—| |¦«| |¦«| |¦«fS)z#:return: tuple(offset, binsha, crc))Ú _offset_v2Ú_sha_v2Ú_crc_v2r¥s rAÚ _entry_v2zPackIndexFile._entry_v2Gs/€à—’ Ñ"Ô" D§L¢L°¡O¤O°T·\²\À!±_´_ÐEÐErCcóú—td|j ¦«|j|dzz¦«d}|dzr.žs/øèè€ÐLÐL°˜Ÿš UÑ+Ô+ÐLÐLÐLÐLÐLÐLrC) r—ÚarrayÚ frombytesrŠr’r¸r¹ÚsysÚ byteorderÚbyteswapÚtuplertrÁ)rZÚas` rAÚoffsetszPackIndexFile.offsets�s¥ø€ð Œ=˜AÒ Ð å” ˜CÑ Ô ˆAØ �KŠK˜œ ×(Ò(Ñ*Ô*¨4Ô+<¸TÔ=QÐ+QÔRÑ SÔ SÐ SõŒ} Ò(Ð(Ø— ’ ‘ ” � ؈HåÐLÐLÐLÐL½¸t¿yºy¹{¼{Ñ9KÔ9KÐLÑLÔLÑLÔLÐ LrCcóò—t|d¦«}|j}d}|dkr|j|dz }|j|}||kr/||zdz}||¦«}||kr|}n ||kr|S|dz}||k°/dS)z± :return: index usable with the ``offset`` or ``entry`` method, or None if the sha was not found in this pack index :param sha: 20 byte sha to lookuprr,rlN)r rvrÀ)rZrvÚ first_byteÚget_shaÚloÚhiÚmidÚmid_shas rAÚ sha_to_indexzPackIndexFile.sha_to_index¡s¦€õ ˜c !œfÑ%Ô%ˆ Ø”(ˆØ ˆØ ˜Š?ˆ?ØÔ# J°¡NÔ3ˆBØ Ô   Ô +ˆð�2Šgˆgؘ‘7˜q‘.ˆCØ�g˜c‘l”lˆGØ�WŠ}ˆ}Ø��ؘ’�Ø� à˜1‘W�ð�2ŠgˆgðˆtrCcó —t|¦«dkrtd¦«‚t|t¦«s Jd¦«‚t |d¦«}|j}d}|dkr|j|dz }|j|}|tdt|¦«z zz}||kr0||zdz}||¦«} || kr|}n|| kr|}n |dz}||k°0|| ¦«kr`||¦«} t||| ¦«rDd} |dz| ¦«kr||dz¦«} | r| | krt|¦«‚|SdS)af :return: index as in `sha_to_index` or None if the sha was not found in this index file :param partial_bin_sha: an at least two bytes of a partial binary sha as bytes :param canonical_length: length of the original hexadecimal representation of the given partial binary sha :raise AmbiguousObjectName:rlz'Require at least 2 bytes of partial shazpartial_bin_sha must be bytesrr,r0N) rEÚ ValueErrorÚ isinstanceÚbytesr rvrÀr'rÁrr) rZÚpartial_bin_shaÚcanonical_lengthrßràrárâÚ filled_sharãräÚcur_shaÚnext_shas rAÚpartial_sha_to_indexz"PackIndexFile.partial_sha_to_index»s–€õ ˆÑ Ô  !Ò #Ð #ÝÐFÑGÔGÐ Gå˜/­5Ñ1Ô1ÐRÐRÐ3RÑRÔRÐ1ݘo¨aÔ0Ñ1Ô1ˆ à”(ˆØ ˆØ ˜Š?ˆ?ØÔ# J°¡NÔ3ˆBØ Ô   Ô +ˆð%¥y°B½¸_Ñ9MÔ9MÑ4MÑ'NÑNˆ ð�2Šgˆgؘ‘7˜q‘.ˆCØ�g˜c‘l”lˆGؘGÒ#Ð#Ø��ؘwÒ&Ð&à�Øà˜1‘W�ð�2Šgˆgð �— ’ ‘ ” Ò Ð Ø�g˜b‘k”kˆGÝ%Ð&6¸ÈÑQÔQð Ø�ؘ‘6˜DŸIšI™KœKÒ'Ð'Ø&˜w r¨A¡v™œ�HØð? ¨GÒ 3Ð 3Ý-¨oÑ>Ô>Ð>Ø� ðˆtrCrcó"—t||¦«SrWr©rZrvs rAråzPackIndexFile.sha_to_indexñs€Ý-¨d°CÑ8Ô8Ð 8rC)r}r~rr€r»rrrsr[r‹rŸr¦r¨r­r°rµr²r³r´ršr¿rÉrÁrÌrÎrÐrÝrårïÚglobalsÚ __classcell__)r‡s@rAr(r(ôsÆø€€€€€ð%ð%ð ÐØ#ÐØÐð$ð$ð$ð$ð$ðððð#ð#ð#ðPOðOðOðGðGðGð2ð2ð2ð ðððFðFðFð ð ð ð2ð2ð2ð WðWðWðGðGðGððððððð'ð'ð'ðððð+ð+ð+ð(ð(ð(ðMðMðMð"ððð41ð1ð1ðf$ w w¡y¤yÐ0Ð0ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð1Ð0Ð0Ð0rCr(cóx—eZdZdZdZdZdZdZdZd„Z d„Z d „Z dd „Z d „Z d „Zd„Zd„Zd„Zd„Zd„Zd„Zdd„ZdS)r)aëA pack is a file written according to the Version 2 for git packs As we currently use memory maps, it could be assumed that the maximum size of packs therefore is 32 bit on 32 bit systems. On 64 bit systems, this should be fine though. **Note:** at some point, this might be implemented using streams as well, or streams are an alternate path in the case memory maps cannot be created for some reason - one clearly doesn't want to read 10GB at once in that case)Ú _packpathrŠÚ_sizer—iKCAPrlé r0có—||_dSrW©rõ)rZÚpackpaths rAr[zPackFile.__init__ s €Ø!ˆŒˆˆrCcóF—tj|j¦«d|_dSrW)rr‰rõrŠrYs rAr‹zPackFile.closes €Ý Ô)¨$¬.Ñ9Ô9Ð9؈Œ ˆ ˆ rCcó —tj|j¦« ¦«|_t d|j ¦«d¦«\}|_|_||j krtd|z¦«‚dS)Nú>LLLrzInvalid pack signature: %i) rr“rõr1rŠr r’r—röÚpack_signaturer)rZr›r7s rArŸzPackFile._set_cache_s{€åÔ'¨¬Ñ7Ô7×BÒBÑDÔDˆŒ õ.9¸ÀÄ×AQÒAQÑASÔASÐUVÑ-WÔ-WÑ*ˆ�” ¤ ð �dÔ)Ò )Ð )ÝÐ9¸GÑCÑDÔDÐ Dð *Ð )rCTc#óÊK—|j}| ¦«|jz }|p|j}t ¦«}||kr t ||d¦«\}}t |j|j|j t¦«|j j |j ksJ‚|||j z |j  ¦«zz }|r|j  d¦«|V—||k°ždSdS)z7Handle the actual iteration of objects within this packTrN)rŠr•Ú footer_sizeÚfirst_object_offsetr#rBrrHrIrÁrr@Ú_brÚ pack_offsetÚcompressed_bytes_readÚseek) rZÚ start_offsetr5r=Ú content_sizeÚ cur_offsetÚnullÚ data_offsetÚostreams rAÚ _iter_objectszPackFile._iter_objects sôèè€à ŒLˆØ—{’{‘}”} tÔ'7Ñ7ˆ Ø!Ð= TÔ%=ˆ å‰|Œ|ˆØ˜<Ò'Ð'Ý#1°!°ZÀÑ#FÔ#FÑ ˆK˜õ ˜œ  d¤j°'´,Å Ñ KÔ KÐ KØ”>Ô%¨¬Ò5Ð5Ð5Ð5Ø ˜;¨Ô)<Ñ<ÀÄ×@dÒ@dÑ@fÔ@fÑfÑ fˆJð ð 'Ø”×#Ò# AÑ&Ô&Ð&؈MˆMˆMð˜<Ò'Ð'Ð'Ð'Ð'Ð'rCcó—|jS)z2:return: The amount of objects stored in this pack)rörYs rArÁz PackFile.size:ó €àŒzÐrCcó—|jS)z!:return: the version of this packrÈrYs rArÉzPackFile.version>s €àŒ}ÐrCcóX—|j ¦« ¦«S)zð :return: read-only data of this pack. It provides random access and usually is a memory map. :note: This method is unsafe as it returns a window into a file which might be larger than than the actual window size)rŠr1r’rYs rAr6z PackFile.dataBs$€ð Œ|×&Ò&Ñ(Ô(×,Ò,Ñ.Ô.Ð.rCcóž—|j |j ¦«dz ¦« ¦«dd…S)zE:return: 20 byte sha1 hash on all object sha's contained in this filer0N)rŠr1r•r2rYs rAÚchecksumzPackFile.checksumJs@€àŒ|×&Ò& t¤|×'=Ò'=Ñ'?Ô'?À"Ñ'DÑEÔE×LÒLÑNÔNÈqÈqÈqÔQÐQrCcó—|jS)z:return: path to the packfilerùrYs rArÌz PackFile.pathNs €àŒ~ÐrCcóΗt¦«}|j} t||d¦«d}| |¦«|jt kr|j|jz }nnŒN|S)a :return: list of pack streams which are required to build the object at the given offset. The first entry of the list is the object at offset, the last one is either a full object, or a REF_Delta stream. The latter type needs its reference object to be locked up in an ODB to form a valid delta chain. If the object at offset is no delta, the size of the list is 1. :param offset: specifies the first byte of the object within this packTr,)rXrŠrBr]r7rrr;)rZr4rÆr=r s rAÚcollect_streamszPackFile.collect_streamsUsq€õ‰fŒfˆØ ŒLˆð Ý$ Q¨°Ñ5Ô5°aÔ8ˆGØ �JŠJ�wÑ Ô Ð ØŒ¥)Ò+Ð+Ø Ô,¨wÔ/AÑA��ð ð ðˆ rCcóH—t|j|p|jd¦«dS)zËRetrieve information about the object at the given file-absolute offset :param offset: byte offset :return: OPackInfo instance, the actual type differs depending on the type_id attributeFr,©rBrŠr©rZr4s rAÚinfoz PackFile.infors'€õ ˜dœl¨FÐ,N°dÔ6NÐPUÑVÔVÐWXÔYÐYrCcóH—t|j|p|jd¦«dS)zßRetrieve an object at the given file-relative offset as stream along with its information :param offset: byte offset :return: OPackStream instance, the actual type differs depending on the type_id attributeTr,rrs rAr@zPackFile.streamys'€õ ˜dœl¨FÐ,N°dÔ6NÐPTÑUÔUÐVWÔXÐXrCrcó0—| |d¬¦«S)a¤ :return: iterator yielding OPackStream compatible instances, allowing to access the data in the pack directly. :param start_offset: offset to the first object to iterate. If 0, iteration starts at the very first object in the pack. **Note:** Iterating a pack directly is costly as the datastream has to be decompressed to determine the bounds between the objectsT©r5©r )rZrs rAÚ stream_iterzPackFile.stream_iter€s€ð×!Ò! ,¸$Ð!Ñ?Ô?Ð?rCN)Tr£)r}r~rr€r�rþÚpack_version_defaultrrr[r‹rŸr rÁrÉr6rrÌrrr@rrarCrAr)r)øs€€€€€ð  ð  ð>€IØ€NØÐð ÐØ€Kð"ð"ð"ðððð Eð Eð Eððððð4ðððððð/ð/ð/ðRðRðRððððððð:ZðZðZðYðYðYð @ð @ð @ð @ð @ð @rCr)cóÖ—eZdZdZdZeZeZd„Z d„Z d„Z d„Z d„Z dd „Zd „Zd „Zd „Zd „Zd„Zd„Zdd„Zd„Zd„Zd„Zd„Zeddejfd„¦«Zedejfd„¦«ZdS)r*zqCombines the PackIndexFile and the PackFile into one, allowing the actual objects to be resolved and iterated)Ú_indexÚ_packÚ _offset_mapcó¾—tj |¦«\}}| d|z¦«|_| d|z¦«|_dS)zGInitialize ourselves with the path to the respective pack or index filez%s.idxz%s.packN)ÚosrÌÚsplitextÚ IndexFileClsr!Ú PackFileClsr")rZÚpack_or_index_pathÚbasenameÚexts rAr[zPackEntity.__init__›sT€åœ×(Ò(Ð);Ñ<Ô<‰ ˆ�#Ø×'Ò'¨°8Ñ(;Ñ<Ô<ˆŒ Ø×%Ò% i°(Ñ&:Ñ;Ô;ˆŒ ˆ ˆ rCcój—|j ¦«|j ¦«dSrW)r!r‹r"rYs rAr‹zPackEntity.close¡s0€Ø Œ ×ÒÑÔÐØ Œ ×ÒÑÔÐÐÐrCcóÌ—t|j ¦«¦«}t|j ¦«¦«|jjz }|s Jd¦«‚d}t|¦«dkr |d|i}nWt|¦«}t|¦«}t|¦«t||¦«}t|¦«}|||d<||_ dS)NzCannot handle empty indicesr,réÿÿÿÿ) Úsortedr!rÝrEr"r6rÚiterÚnextÚzipÚdictr#)rZr›Úoffsets_sortedÚ last_offsetÚ offset_mapÚ iter_offsetsÚiter_offsets_plus_oneÚ consecutives rArŸzPackEntity._set_cache_¥så€õ   ¤ × 3Ò 3Ñ 5Ô 5Ñ6Ô6ˆÝ˜$œ*Ÿ/š/Ñ+Ô+Ñ,Ô,¨t¬zÔ/EÑEˆ ØÐ<Ð<Ð<Ñ<Ô<ˆ~àˆ Ý ˆ~Ñ Ô  !Ò #Ð #Ø(¨Ô+¨[Ð9ˆJˆJå Ñ/Ô/ˆLÝ$(¨Ñ$8Ô$8Ð !Ý Ð&Ñ 'Ô 'Ð 'ݘlÐ,AÑBÔBˆKå˜kÑ*Ô*ˆJð.9ˆJ�~ bÔ)Ñ *à%ˆÔÐÐrCcó\—|j |¦«}|€t|¦«‚|S)z*:return: index for the given sha, or raise)r!rår)rZrvrÕs rAÚ _sha_to_indexzPackEntity._sha_to_index¾s-€à” ×(Ò(¨Ñ-Ô-ˆØ ˆ=ݘC‘.”.Р؈ rCc#ó²K—|jj}|j}t|j ¦«¦«D]}|||¦«||¦«V—ŒdS)zPIterate over all objects in our index and yield their OInfo or OStream instencesN)r!rvÚ_objectrtrÁ)rZr5Ú_shar=rÕs rAr zPackEntity._iter_objectsÅsjèè€àŒ{ŒˆØ”,ˆÝ˜4œ;×+Ò+Ñ-Ô-Ñ.Ô.ð 9ð 9ˆEØ�'˜$˜$˜u™+œ+ y°%Ñ8Ô8Ð 8Ð 8Ð 8Ð 8ð 9ð 9rCr.có¨—|dkr| |¦«}|€|j |¦«}|j |¦«}t |jj |¦« ¦«¦«\}}}|r„|tvr;|j  |¦«}t||j |j |j ¦«S| |¦«} tj| ¦«} t#|| j d| ¦«S|tvrt%|t&||¦«S| |¦«} | d d¦«} t+| ¦«\}} t+| |¦«\}} | djtvrt/|d¦«‚t%|| dj | ¦«S)zž:return: OInfo or OStream object providing information about the given sha :param index: if not -1, its assumed to be the sha's index in the IndexFilerNir.zCould not resolve delta object)r;r!rvr4r r"rŠr1r2rr@rÚtyperÁÚcollect_streams_at_offsetr!ÚnewrrrrHrr7r)rZrvr5rÕr4r7r8r9Ú packstreamÚstreamsÚdstreamÚbufÚsrc_sizeÚ target_sizes rAr=zPackEntity._objectÍs¯€ð �1Š9ˆ9Ø×&Ò& sÑ+Ô+ˆEØ ˆ;Ø”+—/’/ %Ñ(Ô(ˆCà”×#Ò# EÑ*Ô*ˆÝ1HÈÌÔI[×IfÒIfÐgmÑInÔIn×IuÒIuÑIwÔIwÑ1xÔ1xÑ.ˆ�Ð.Ø ð =Ø�kÐ)Ð)Ø!œZ×.Ò.¨vÑ6Ô6� ݘs J¤O°Z´_ÀjÔFWÑXÔXÐXð ×4Ò4°VÑ<Ô<ˆGÝ&Ô*¨7Ñ3Ô3ˆGå  W¤\°4¸ÑAÔAÐ Aà�kÐ)Ð)ݘSÕ"5°gÔ">À ÑLÔLÐLð ×4Ò4°VÑ<Ô<ˆGؘ!”*—/’/ #Ñ&Ô&ˆCÝ'¨™}œ}Ñ ˆF�HÝ"*¨3°Ñ"7Ô"7Ñ ˆF�Kð�rŒ{Ô"¥kÐ1Ð1Ý Ð%EÑFÔFÐFݘ˜g bœkÔ.° Ñ<Ô<Ð ¥YÒ.Ð.å! &Ô"3µZÑ@Ô@ðMØ!%¤×!9Ò!9¸&Ô:K×:SÒ:SÑ:UÔ:UÑ!VÔ!V˜˜à!%¤×!9Ò!9¸&Ô:KÑ!LÔ!L˜Ø�~ØØ!œZ×.Ò.¨t¬{×/AÒ/AÀ&Ñ/IÔ/IÑJÔJ�FØ—N’N 6Ñ*Ô*Ð*Ð*ð "œZ×.Ò.¨vÔ/@ÑAÔA�FØ—N’N 6Ñ*Ô*Ð*ð!”.¥KÐ/Ñ/ð*ˆrCcó‚—| |j | |¦«¦«¦«S)ab As ``PackFile.collect_streams``, but takes a sha instead of an offset. Additionally, ref_delta streams will be resolved within this pack. If this is not possible, the stream will be left alone, hence it is adivsed to check for unresolved ref-deltas and resolve them before attempting to construct a delta stream. :param sha: 20 byte sha1 specifying the object whose related streams you want to collect :return: list of streams, first being the actual object delta, the last being a possibly unresolved base object. :raise BadObject:)rAr!r4r;rñs rArzPackEntity.collect_streams„s7€ð×-Ò-¨d¬k×.@Ò.@À×ASÒASÐTWÑAXÔAXÑ.YÔ.YÑZÔZÐZrCNcóΗ|}|s:t|ttf¦«st|¦«}t|¦«}t |¦«}|j}d} d} |du} |t dtjtj |¦«¦«| dz } | rt¦«} d} |D]Á} | dz } d}t| j | j ¦«}|rt|¦«}nd}||¦«tj|¦«}| j}t%|j|||¬¦«\}}}|| j ksJ‚| r|  | j|| ¦«| t|¦«|zz } | |krnŒÂ| |krt-d|| fz¦«‚| d¬ ¦«}t|¦«d ksJ‚||¦«| t|¦«z } d}| r|  ||¦«}||fS) a® Create a new pack by putting all objects obtained by the object_iterator into a pack which is written using the pack_write method. The respective index is produced as well if index_write is not Non. :param object_iter: iterator yielding odb output objects :param pack_write: function to receive strings to write into the pack stream :param indx_write: if not None, the function writes the index file corresponding to the pack. :param object_count: if you can provide the amount of objects in your iteration, this would be the place to put it. Otherwise we have to pre-iterate and store all items into a list to get the number, which uses more memory than necessary. :param zlib_compression: the zlib compression level to use :return: tuple(pack_sha, index_binsha) binary sha over all the contents of the pack and over all contents of the index. If index_write was None, index_binsha will be None **Note:** The destination of the write functions is up to the user. It could be a socket, or a file for instance **Note:** writes only undeltified objectsrNrýr÷r,)rKzKExpected to write %i objects into pack, but received only %i from iteratorsFror0)rèrÛrXrEr$rIr%r)rþrrTr r7rÁr&rTÚ compressobjr@rRrHr]r^rçrv)ÚclsÚ object_iterÚ pack_writeÚ index_writeÚ object_countÚzlib_compressionÚobjsÚ pack_writerÚpwriter|rÕÚ wants_indexÚ actual_countÚobjrOÚhdrrJr rLrMrwÚ index_shas rAÚ write_packzPackEntity.write_pack’sI€ð.ˆØð %ݘk­Eµ4¨=Ñ9Ô9ð )ݘKÑ(Ô(�å˜t™9œ9ˆLõ)¨Ñ4Ô4ˆ ØÔ"ˆØˆØˆØ!¨Ð-ˆ ð ˆ�t�F�HÔ3µXÔ5RÐT`ÑaÔaÑbÔbÐbØ ˆr‰ ˆà ð "Ý‘M”MˆEðˆ Øð ð ˆCØ ˜AÑ ˆL؈Cõ,¨C¬K¸¼ÑBÔBˆCØð ݘC‘j”j��à�à ˆF�3‰KŒKˆKõÔ&Ð'7Ñ8Ô8ˆGØ”jˆGÝ.¨w¬|¸VÀWÐWZÐ[Ñ[Ô[‰KˆB��Cؘœ’>�>�>�>Øð 3Ø— ’ ˜SœZ¨¨cÑ2Ô2Ð2ð •3�s‘8”8˜b‘=Ñ ˆCؘ|Ò+Ð+Ø�ð,ð ˜<Ò 'Ð 'ÝØ]ÐamÐo{Ð`|Ñ|ñ~ô~ð ~ð —?’?¨%�?Ñ0Ô0ˆÝ�8‰}Œ} Ò"Ð"Ð"Ð"؈ �8ÑÔÐØ �s�8‰}Œ}Ñˆàˆ Ø ð ;ØŸ š  H¨kÑ:Ô:ˆIð˜Ð"Ð"rCcó<‡‡—tjdd|¦«\Š}tjdd|¦«\Š}ˆfd„}ˆfd„}| |||||¦«\} } tj‰¦«tj‰¦«d} tj || t| ¦«dfz¦«} tj || t| ¦«dfz¦«} tj|| ¦«tj|| ¦«|| ¦«S)aœCreate a new on-disk entity comprised of a properly named pack file and a properly named and corresponding index file. The pack contains all OStream objects contained in object iter. :param base_dir: directory which is to contain the files :return: PackEntity instance initialized with the new pack **Note:** for more information on the other parameters see the write_pack methodÚr%rÕcó.•—tj‰|¦«SrW©r%rI)rÅÚpack_fds €rArcz#PackEntity.create..øsø€�rœx¨°Ñ3Ô3€rCcó.•—tj‰|¦«SrWr|)rÅÚindex_fds €rArcz#PackEntity.create..ùsø€¥¤¨°1Ñ 5Ô 5€rCz pack-%s.%sÚidx) ÚtempfileÚmkstemprxr%r‹rÌrur Úrename)rjrkÚbase_dirrnroÚ pack_pathÚ index_pathrlrmÚ pack_binshaÚ index_binshaÚfmtÚ new_pack_pathÚnew_index_pathrr}s @@rAÚcreatezPackEntity.createîsøø€õ&Ô-¨b°&¸(ÑCÔCш�Ý'Ô/°°G¸XÑFÔFш�*Ø3Ð3Ð3Ð3ˆ Ø5Ð5Ð5Ð5ˆ à$'§N¢N°;À ÈKÐYeÐgwÑ$xÔ$xÑ!ˆ �\Ý Œ�ÑÔÐÝ Œ�ÑÔÐàˆÝœŸ š  X¨sµjÀÑ6MÔ6MÈvÐ5VÑ/VÑWÔWˆ ÝœŸš h°µzÀ+Ñ7NÔ7NÐPUÐ6VÑ0VÑWÔWˆÝ Œ �)˜]Ñ+Ô+Ð+Ý Œ �*˜nÑ-Ô-Ð-àˆs�=Ñ!Ô!Ð!rC)r.)F)r}r~rr€r�r(r'r)r(r[r‹rŸr;r r=rr@rNrPr%rÕr_rarrArÚ classmethodrTÚ Z_BEST_SPEEDrxrŒrarCrAr*r*Žs˜€€€€€ð2ð2ð€Ið !€LØ€Kð<ð<ð<ð ððð&ð&ð&ð2ððð9ð9ð9ð'=ð'=ð'=ð'=ðX(ð(ð(ð'ð'ð'ð0ð0ð0ð/ð/ð/ððððððð5ð5ð5ð5ðn3ð3ð3ð 2ð2ð2ð !ð!ð!ðF [ð [ð [ðØ=AØ $°tÔ7HðY#ðY#ðY#ñ„[ðY#ðvØ8<ÈtÔO`ð"ð"ð"ñ„[ð"ð"ð"rCr*rW);r€rTÚ gitdb.excrrrrÚ gitdb.utilrrr r r Ú gitdb.funr r rrrrrrrrrÚgitdb_speedups._perfrÚ ImportErrorÚ gitdb.baserrrrrrrÚ gitdb.streamr r!r"r#r$Ústructr%Úbinasciir&Ú gitdb.constr'r�rÖr%rØÚ__all__rBrRrTr(r)r*rarCrAúršsZðð :Ð9Ø € € € ððððððððððððððððððððððððððð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð Ø?Ð?Ð?Ð?Ð?Ð?Ð?øØð ð ð Ø€Dð øøøðððððððððððððððððððððððððððððððððÐÐÐÐÐØÐÐÐÐÐà!Ð!Ð!Ð!Ð!Ð!à€€€Ø € € € Ø € € € Ø € € € à 5€ð 1]ð1]ð1]ðl%ð%ð%ð%ðVDðDðDðDðDñDôDðDðN~9ð~9ð~9ð~9ð~9�Iñ~9ô~9ð~9ðHQ@ðQ@ðQ@ðQ@ðQ@ˆyñQ@ôQ@ðQ@ðlw"ðw"ðw"ðw"ðw"�ñw"ôw"ðw"ðw"ðw"s¼AÁA Á A