/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__/util.cpython-311.pyc (16223B)
§ á»&p %÷ãó‚—ddlZddlZddlZddlZddlZddlZddlmZddlm Z m Z m Z e ¦«Z ddl Z ddlmZn!#e$rddlmZmZe¦«Zdd„ZYnwxYwejZejZejZejjZejZejZejjZejjZej Z ejj!Z!ejj"Z"ejj#Z#ej$Z$ej%Z%ej&Z&ej'Z'd„Z(d„Z)dd l*m+Z+m,Z,Gd „d ¦«Z-d „Z.dd„Z/d„Z0dd„Z1dd„Z2dd„Z3d„Z4d„Z5Gd„d¦«Z6Gd„d¦«Z7dS)éN)ÚBytesIO)ÚStaticWindowMapManagerÚSlidingWindowMapManagerÚSlidingWindowMapBuffer)Ú unpack_from)ÚunpackÚcalcsizecó¨— t|}n)#t$rt|¦«}|t|<YnwxYwt|||||z…¦«S©N)Ú__calcsize_cacheÚKeyErrorr r)ÚfmtÚdataÚoffsetÚsizes ú\/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/gitdb/util.pyrr!sj€ð )Ý# CÔ(ˆDˆDøÝð )ð )ð )ݘC‘=”=ˆDØ$(Õ ˜SÑ !Ð !Ð !ð )øøøõ�c˜4 ¨°© Ð 5Ô6Ñ7Ô7Ð7s ‚ �#6µ6có—tjdkrHtd¦«D]0} ||i|¤ŽcS#t$rt jd¦«YŒ-wxYw||i|¤ŽS||i|¤ŽS)NÚwin32é gš™™™™™¹?)ÚsysÚplatformÚrangeÚ ExceptionÚtimeÚsleep)ÚfuncÚargsÚkwargsÚ_s rÚ_retryr Dsœ€õ „|�wÒÐÝ�r‘”ð ð ˆAð Ø�t˜TÐ, VÐ,Ð,Ð,Ð,Ð,øÝð ð ð Ý” ˜3‘”���ð øøøàˆt�TÐ$˜VÐ$Ð$Ð$àˆt�TÐ$˜VÐ$Ð$Ð$s£-­AÁ Acó6—ttjg|¢Ri|¤ŽSr )r ÚosÚremove)rrs rr#r#Rs"€Ý •"”)Ð -˜dÐ -Ð -Ð - fÐ -Ð -Ð-ó)Ú NULL_BIN_SHAÚ NULL_HEX_SHAcó6—eZdZdZdZd d„Zd„Zd„Zd„Zd„Z d S) Ú_RandomAccessBytesIOz‡Wrapper to provide required functionality in case memory maps cannot or may not be used. This is only really required in python 2.4Ú_sioÚcó.—t|¦«|_dSr )rr))ÚselfÚbufs rÚ__init__z_RandomAccessBytesIO.__init__gs€Ý˜C‘L”LˆŒ ˆ ˆ r$có,—t|j|¦«Sr )Úgetattrr)©r,Úattrs rÚ __getattr__z _RandomAccessBytesIO.__getattr__js€Ý�t”y $Ñ'Ô'Ð'r$cóD—t| ¦«¦«Sr )ÚlenÚgetvalue©r,s rÚ__len__z_RandomAccessBytesIO.__len__ms€Ý�4—=’=‘?”?Ñ#Ô#Ð#r$có6—| ¦«|Sr ©r6)r,Úis rÚ __getitem__z _RandomAccessBytesIO.__getitem__ps€Ø�}Š}‰Œ˜qÔ!Ð!r$có:—| ¦«||…Sr r:)r,ÚstartÚends rÚ __getslice__z!_RandomAccessBytesIO.__getslice__ss€Ø�}Š}‰Œ˜u S˜yÔ)Ð)r$N)r*) Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__r.r3r8r<r@©r$rr(r(ass€€€€€ð?ð?à€Ið!ð!ð!ð!ð(ð(ð(ð$ð$ð$ð"ð"ð"ð*ð*ð*ð*ð*r$r(cóF— t|¦«S#t$r|cYSwxYw)z„ Return the integer representation of the byte string. This supports Python 3 byte arrays as well as standard strings. )ÚordÚ TypeError)Úbs rÚbyte_ordrKws6€ð Ý�1‰vŒvˆ øÝ ðððØˆˆˆðøøøs ‚‘ Ÿ r$có‚— tj|¦«S#t$rddl}| |¦«}|cYSwxYw)z`A python2.4 workaround for the sha/hashlib module fiasco **Note** From the dulwich project rN)ÚhashlibÚsha1Ú NameErrorÚsha)ÚsourcerPrNs rÚmake_sharR†sS€ðÝŒ|˜FÑ#Ô#Ð#øÝ ðððØˆ ˆ ˆ Ø�wŠw�v‰ŒˆØˆ ˆ ˆ ðøøøs ‚–%>½>cóœ—|dkrtd¦«S tjd|¦«S#t$rtd|z¦«cYSwxYw)zB:return: a file-protocol accessible memory block of the given sizerr$éÿÿÿÿó)r(ÚmmapÚOSError)rs rÚallocate_memoryrX’se€à ˆq‚y€yÝ# CÑ(Ô(Ð(ð2ÝŒy˜˜TÑ"Ô"Ð"øÝ ð2ð2ð2õ $ E¨D¡LÑ1Ô1Ð1Ð1Ð1ð 2øøøs—,¬A Á A FTcó|— |rj tj|dtj¬¦«S#t$r;tj|tj|¦«jtj¬¦«cYSwxYwn#t$rYnwxYwtj|tj|¦«j¦«}|rt|¦«S|S)aÈ:return: read-only contents of the file represented by the file descriptor fd :param fd: file descriptor opened for reading :param stream: if False, random access is provided, otherwise the stream interface is provided. :param allow_mmap: if True, its allowed to map the contents into memory, which allows large files to be handled and accessed efficiently. The file-descriptor will change its position if this is Falser)Úaccess)rVÚ ACCESS_READrWr"ÚfstatÚst_sizeÚreadr()ÚfdÚstreamÚ allow_mmapÚcontentss rÚfile_contents_rorc£sÛ€ð  Ø ð Tð TÝ”y  Q­tÔ/?Ð@Ñ@Ô@Ð@øÝð Tð Tð Tå”y ¥R¤X¨b¡\¤\Ô%9Å$ÔBRÐSÑSÔSÐSÐSÐSð Tøøøð  Tøõ ð ð ð Ø ˆð øøøõ Œw�r�2œ8 B™<œ<Ô/Ñ0Ô0€HØ ð.Ý# HÑ-Ô-Ð-Ø €Os-‚A/… &¦AA+Á(A/Á*A+Á+A/Á/ A<Á;A<c óÞ—tj|tjttdd¦«z|z¦«} t |||¦«t |¦«S#t |¦«wxYw)a<Get the file contents at filepath as fast as possible :return: random access compatible memory of the given filepath :param stream: see ``file_contents_ro`` :param allow_mmap: see ``file_contents_ro`` :param flags: additional flags to pass to os.open :raise OSError: If the file could not be opened **Note** for now we don't try to use O_NOATIME directly as the right value needs to be shared per database in fact. It only makes a real difference for loose object databases anyway, and they use it with the help of the ``flags`` parameterÚO_BINARYr)r"ÚopenÚO_RDONLYr0rcÚclose)Úfilepathr`raÚflagsr_s rÚfile_contents_ro_filepathrkÀs^€õ Œ��2œ;­µ°ZÀÑ)CÔ)CÑCÀeÑKÑ LÔ L€BðÝ  F¨JÑ7Ô7å ˆb‰ Œ ˆ ˆ ø�ˆb‰ Œ ˆ ˆ øøøs »AÁA,cóT—tt |¦«|¬¦«S)z‡ :return: a buffer compatible object which uses our mapped memory manager internally ready to read the whole given filepath)rj)rÚmmanÚ make_cursor)rirjs rÚsliding_ro_bufferroÔs%€õ "¥$×"2Ò"2°8Ñ"<Ô"<ÀEÐ JÑ JÔ JÐJr$cóJ—t|¦«dkr|St|¦«S)z!:return: hexified version of shaé()r5Ú bin_to_hex©rPs rÚ to_hex_shartÛs"€å ˆ3�x„x�2‚~€~؈ Ý �c‰?Œ?Ðr$cóJ—t|¦«dkr|St|¦«S)Né)r5Ú hex_to_binrss rÚ to_bin_sharxâs"€Ý ˆ3�x„x�2‚~€~؈ Ý �c‰?Œ?Ðr$có2—eZdZdZe¦«Zd„Zd„ZdS)Ú LazyMixina? Base class providing an interface to lazily retrieve attribute values upon first access. If slots are used, memory will only be reserved once the attribute is actually accessed and retrieved the first time. All future accesses will return the cached value as stored in the Instance's dict or slot. cób—| |¦«t ||¦«S)zÊ Whenever an attribute is requested that we do not know, we allow it to be created and set. Next time the same attribute is requested, it is simply returned from our dict/slots. )Ú _set_cache_ÚobjectÚ__getattribute__r1s rr3zLazyMixin.__getattr__øs.€ð ×Ò˜ÑÔÐå×&Ò& t¨TÑ2Ô2Ð2r$có—dS)a£ This method should be overridden in the derived class. It should check whether the attribute named by attr can be created and cached. Do nothing if you do not know the attribute or call your subclass The derived class may create as many additional attributes as it deems necessary in case a git command returns more information than represented in the single attribute.NrFr1s rr|zLazyMixin._set_cache_s €ð ˆr$N)rArBrCrDÚtuplerEr3r|rFr$rrzrzísI€€€€€ððð�‘”€Ið3ð3ð3ð  ð  ð  ð  ð  r$rzcóD—eZdZdZdZd„Zd„Zd„Zd d„Zd„Z d „Z dd „Z d S)ÚLockedFDa This class facilitates a safe read and write operation to a file on disk. If we write to 'file', we obtain a lock file at 'file.lock' and write to that instead. If we succeed, the lock file will be renamed to overwrite the original file. When reading, we obtain a lock file, but to prevent other writers from succeeding while we are reading the file. This type handles error correctly in that it will assure a consistent state on destruction. **note** with this setup, parallel reading is not possible©Ú _filepathÚ_fdÚ_writecó0—||_d|_d|_dS)z.Initialize an instance with the givne filepathNrƒ)r,ris rr.zLockedFD.__init__s€à!ˆŒØˆŒØˆŒ ˆ ˆ r$có@—|j�| ¦«dSdSr )r…Úrollbackr7s rÚ__del__zLockedFD.__del__$s#€à Œ8Ð Ø �MŠM‰OŒOˆOˆOˆOð Ð r$có—d|jzS)Nz%s.lock)r„r7s rÚ _lockfilepathzLockedFD._lockfilepath)s€Ø˜4œ>Ñ)Ð)r$FcóÚ—|j�td|jz¦«‚||_ttdd¦«}tjtjztjz|z} t j| ¦«|tdd¦«¦«}|st j |¦«n||_ n7#t$r*}td| ¦«z¦«|‚d}~wwxYw|j €U t j|j tj|z¦«|_ n'#t| ¦«¦«‚xYw|rddlm}||j ¦«S|j S) a˜ Open the file descriptor for reading or writing, both in binary mode. :param write: if True, the file descriptor will be opened for writing. Other wise it will be opened read-only. :param stream: if True, the file descriptor will be wrapped into a simple stream object which supports only reading or writing :return: fd to read from or write to. It is still maintained by this instance and must not be closed directly :raise IOError: if the lock could not be retrieved :raise OSError: If the actual file could not be opened for reading **note** must only be called onceNzCalled %s multiple timesrerÚ600éz Lock at %r could not be obtained)ÚFDStream)r†ÚAssertionErrorrfr0r"ÚO_WRONLYÚO_CREATÚO_EXCLrŒÚintrhr…rWr„rgr#Ú gitdb.streamr�)r,Úwriter`ÚbinaryÚlockmoder_Úer�s rrfz LockedFD.open,sp€ð Œ;Ð "Ý Ð!;¸d¼iÑ!GÑHÔHÐ HàˆŒ õ�˜Z¨Ñ+Ô+ˆÝ”;¥¤Ñ+­b¬iÑ7¸&Ñ@ˆð \Ý”˜×+Ò+Ñ-Ô-¨x½¸UÀA¹¼ÑGÔGˆBØð Ý”˜‘ ” � � à�”øøåð \ð \ð \ÝÐ<¸t×?QÒ?QÑ?SÔ?SÑSÑTÔTÐZ[Ð [øøøøð \øøøð Œ8Ð ð Ýœ7 4¤>µ2´;ÀÑ3GÑHÔH�”�øð å�t×)Ò)Ñ+Ô+Ñ,Ô,Ð,Øøøøð ð à -Ð -Ð -Ð -Ð -Ð -Ø�8˜DœHÑ%Ô%Ð %à”8ˆOs%Á&AB;Â; C/Ã%C*Ã*C/Ã:,D'Ä'$E có2—| d¬¦«dS)zÏWhen done writing, call this function to commit your changes into the actual file. The file descriptor will be closed, and the lockfile handled. **Note** can be called multiple timesT©Ú successfulN©Ú _end_writingr7s rÚcommitzLockedFD.commitas!€ð ×Ò TÐÑ*Ô*Ð*Ð*Ð*r$có2—| d¬¦«dS)z›Abort your operation without any changes. The file descriptor will be closed, and the lock released. **Note** can be called multiple timesFrœNržr7s rr‰zLockedFD.rollbackis!€ð ×Ò UÐÑ+Ô+Ð+Ð+Ð+r$TcóÊ—|j€td¦«‚|j€dStj|j¦«d|_| ¦«}|jry|rwt jdkr(t|j ¦«rt|j ¦«tj ||j ¦«t|j tdd¦«¦«dSt|¦«dS)z,Handle the lock according to the write mode Nz-Cannot end operation if it wasn't started yetrÚ644r�)r†r‘r…r"rhrŒrrÚisfiler„r#ÚrenameÚchmodr•)r,r�Úlockfiles rrŸzLockedFD._end_writingpsÞ€à Œ;Ð Ý Ð!PÑQÔQÐ Qà Œ8Ð Ø ˆFå Œ�”ÑÔÐØˆŒà×%Ò%Ñ'Ô'ˆØ Œ;ð ˜:ð åŒ|˜wÒ&Ð&ݘ$œ.Ñ)Ô)ð+ݘ4œ>Ñ*Ô*Ð*õ ŒI�h ¤Ñ /Ô /Ð /õ �$”.¥# e¨Q¡-¤-Ñ 0Ô 0Ð 0Ð 0Ð 0õ �8Ñ Ô Ð Ð Ð r$N)FF)T) rArBrCrDrEr.rŠrŒrfr r‰rŸrFr$rr‚r‚ s›€€€€€ð Bð Bð/€Iðððð ððð *ð*ð*ð2ð2ð2ð2ðj+ð+ð+ð,ð,ð,ððððððr$r‚)r)r$)FT)FTr)8Úbinasciir"rVrrÚerrnoÚiorÚsmmaprrrrmrMÚstructrÚ ImportErrorrr Údictr Úa2b_hexrwÚb2a_hexrrÚENOENTÚpathÚexistsÚmkdirr¦Úisdirr¤r¥ÚdirnameÚbasenameÚjoinr^r—rhÚfsyncr r#Ú gitdb.constr%r&r(rKrRrXrcrkrortrxrzr‚rFr$rúr»sûðð €€€Ø € € € Ø € € € Ø € € € Ø € € € Ø € € € àÐÐÐÐÐðððððððððððÐÑ Ô €ð€€€ð 8Ø"Ð"Ð"Ð"Ð"Ð"Ð"øØð 8ð 8ð 8Ø'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ø�t‘v”vÐð8ð8ð8ð8ð8ð8ð 8øøøð"Ô € Ø Ô € 𠌀𠌌€Ø Œ€Ø Œ€Ø ŒŒ €Ø ŒŒ€Ø Œ€Ø Œ'Œ/€Ø Œ7Ô €Ø „w„|€Ø „w€Ø Œ€Ø Œ€Ø Œ€ð %ð %ð %ð.ð.ð.ð ðððððððð*ð*ð*ð*ð*ñ*ô*ð*ð,ððð ð ð ð ð 2ð 2ð 2ð"ðððð:ðððð(KðKðKðKððððððð ð ð ð ð ñ ô ð ð@~ð~ð~ð~ð~ñ~ô~ð~ð~ð~s¸?¿AÁA