§ |<ˆjt.ã ó:—ddlmZddlZddlZddlmZddlmZmZm Z ddl m Z m Z m Z mZmZmZmZddlmZddlmZmZmZmZmZddlmZerddlmZdd lm Z dd l!m"Z"m#Z#d d gZ$Gd „d ee%e%e ee&e&fe%f¦«Z'Gd„d ee'e¦«Z(dS)é)ÚmmapN)Údefenc)Ú parse_dateÚ SerializableÚaltz_to_utctz_str)ÚActorÚLockedFDÚLockFileÚassure_directory_existsÚto_native_pathÚ bin_to_hexÚfile_contents_ro_filepath)ÚIteratorÚListÚTupleÚUnionÚ TYPE_CHECKING)ÚPathLike)ÚSymbolicReference)ÚBytesIO)ÚGitConfigParserÚSectionConstraintÚRefLogÚ RefLogEntrycó>—eZdZdZejd¦«ZdZdefd„Z defd„Z e defd„¦«Z e defd„¦«Z e defd „¦«Ze deeeffd „¦«Ze defd „¦«Zed ed edededededdfd„¦«Zededdfd„¦«ZdS)rz:Named tuple allowing easy access to the revlog data fieldsz^[0-9A-Fa-f]{40}$©Úreturncó*—| ¦«S)z0Representation of ourselves in git reflog format)Úformat©Úselfs ú^/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/git/refs/log.pyÚ__repr__zRefLogEntry.__repr__/s€à�{Š{‰}Œ}Ðóc ó¸—|j}|j}d |j|j|j|j|dt|d¦«|j¦«S)z8:return: a string suitable to be placed in a reflog filez{} {} {} <{}> {!s} {} {} ré) ÚactorÚtimerÚ oldhexshaÚ newhexshaÚnameÚemailrÚmessage)r!Úactr(s r"rzRefLogEntry.format3sW€àŒjˆØŒyˆØ,×3Ò3Ø ŒNØ ŒNØ ŒHØ ŒIØ �ŒGÝ ˜d 1œgÑ &Ô &Ø ŒLñ ô ð r$có—|dS)z=The hexsha to the commit the ref pointed to before the changerrr s r"r)zRefLogEntry.oldhexshaAó €ð�AŒwˆr$có—|dS)z@The hexsha to the commit the ref now points to, after the changer&rr s r"r*zRefLogEntry.newhexshaFr0r$có—|dS)z Actor instance, providing accessérr s r"r'zRefLogEntry.actorKr0r$có—|dS)zetime as tuple: * [0] = int(time) * [1] = int(timezone_offset) in time.altzone formatérr s r"r(zRefLogEntry.timePs €ð �AŒwˆr$có—|dS)zéRéÿÿÿÿzMissing token: >) ÚdecoderÚsplitÚlenr;ÚreprÚ_re_hexsha_onlyÚmatchÚfindrÚ _from_stringrr) r<r>Úline_strÚfieldsÚinfoÚmsgr)r*ÚhexshaÚ email_endr'r(r8s r"Ú from_linezRefLogEntry.from_linemsr€ð —;’;�vÑ&Ô&ˆØ—’  aÑ(Ô(ˆÝ ˆv‰;Œ;˜!Ò Ð Ø˜qœ  4�#ˆDˆDÝ �‰[Œ[˜AÒ Ð Ø‰IˆD�#�#åÐWÕZ^Ð_gÑZhÔZhÑhÑiÔiÐ ið˜˜"˜”Iˆ ؘ˜B˜”Kˆ Ø  )Ð,ð Cð CˆFØÔ&×,Ò,¨VÑ4Ô4ð CÝ �j¸¸Ð!AÑBÔBÐBð Cð —I’I˜c 2Ñ&Ô&ˆ Ø ˜Š?ˆ?ÝÐ/Ñ0Ô0Ð 0õÔ" 4¨¨Y¸©]Ð(:Ô#;Ñ<Ô<ˆÝ$ T¨)°a©-¨/¨/Ô%:Ñ;Ô;‰ˆˆiå˜I y°%¸$À Ð9JÈCÐPÑQÔQÐQr$N)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚreÚcompilerKÚ __slots__Ústrr#rÚpropertyr)r*rr'rÚintr(r-Ú classmethodr=ÚbytesrUrr$r"rr(s×€€€€€àDÐDà �b”jÐ!4Ñ5Ô5€OØ€Ið˜#ððððð  ˜ð  ð  ð  ð  ðð˜3ðððñ„Xððð˜3ðððñ„Xððð�uðððñ„Xððð�e˜C ˜H”oðððñ„Xððð˜ðððñ„Xððð Vàð Vðð Vðð Vð ð Vð ð Vðð Vð ð Vð Vð Vñ„[ð VððR˜UðR }ðRðRðRñ„[ðRðRðRr$có~‡—eZdZdZdZd deedfddfˆfd„ Zd deedffd„Zd!d„Z e deddfd „¦«Z e d d de fd „¦«Z e d ee defdeefd„¦«Ze dededdfd„¦«Zdeddfd„Ze d"deedddfdededede deddfd„¦«Zd#d„Zd$d„Zd$d„ZˆxZS)%ra\A reflog contains RefLogEntrys, each of which defines a certain state of the head in question. Custom query methods allow to retrieve log entries by date or by other criteria. Reflog entries are ordered, the first added entry is first in the list, the last entry, i.e. the last change of the head or reference, is last in the list.)Ú_pathNÚfilepathrcóX•—tt|¦« |¦«}|S©N)ÚsuperrÚ__new__)r<rdÚinstÚ __class__s €r"rhzRefLog.__new__šs%ø€Ý•V˜SÑ!Ô!×)Ò)¨#Ñ.Ô.ˆØˆ r$cóD—||_|�| ¦«dSdS)z°Initialize this instance with an optional filepath, from which we will initialize our data. The path is also used to write changes back using the write() methodN)rcÚ_read_from_file)r!rds r"Ú__init__zRefLog.__init__žs1€ðˆŒ Ø Ð Ø × Ò Ñ "Ô "Ð "Ð "Ð "ð Ð r$cóà— t|jdd¬¦«}n#t$rYdSwxYw | |¦«| ¦«dS#| ¦«wxYw)NT)ÚstreamÚ allow_mmap)rrcÚOSErrorÚ _deserializeÚclose)r!Úfmaps r"rlzRefLog._read_from_file§s~€ð Ý,¨T¬ZÀÐQUÐVÑVÔVˆDˆDøÝð ð ð à ˆFˆFð øøøð  Ø × Ò ˜dÑ #Ô #Ð #à �JŠJ‰LŒLˆLˆLˆLøˆD�JŠJ‰LŒLˆLˆLøøøs‚š (§(¬AÁA-có—||¦«S)zî :return: a new RefLog instance containing all entries from the reflog at the given filepath :param filepath: path to reflog :raise ValueError: If the file could not be read or was corrupted in some wayr)r<rds r"Ú from_filezRefLog.from_file·s€ðˆs�8‰}Œ}Ðr$Úrefrcóf—tj|jjdt |j¦«¦«S)zê :return: string to absolute path at which the reflog of the given ref instance would be found. The path is not guaranteed to point to a valid file though. :param ref: SymbolicReference instanceÚlogs)ÚospÚjoinÚrepoÚgit_dirr Úpath)r<rws r"r~z RefLog.pathÀs'€õŒx˜œÔ(¨&µ.ÀÄÑ2JÔ2JÑKÔKÐKr$rorc#ó K—tj}t|t¦«r't |¦«}t|t ¦«sJ‚n|} | ¦«}|sdS|| ¦«¦«V—Œ8)a :return: Iterator yielding RefLogEntry instances, one for each line read sfrom the given stream. :param stream: file-like object containing the revlog in its native format or string instance pointing to a file to readTN)rrUr:r]rrÚreadlineÚstrip)r<roÚ new_entryÚ_streamr>s r"Ú iter_entrieszRefLog.iter_entriesÉs“èè€õ Ô)ˆ Ý �f�cÑ "Ô "ð å/°Ñ7Ô7ˆGݘg¥tÑ,Ô,Ð ,Ð ,Ð,Ð ,àˆGð *Ø×#Ò#Ñ%Ô%ˆDØð Ø�Ø�)˜DŸJšJ™LœLÑ)Ô)Ð )Ð )Ð )ð  *r$ÚindexrcóÜ—t|d¦«5}|dkrPt | ¦«| ¦«¦«cddd¦«St |dz¦«D].}| ¦«}|std|dz›d�¦«‚Œ/t | ¦«¦«cddd¦«S#1swxYwYdS)a :return: RefLogEntry at the given index :param filepath: full path to the index file from which to read the entry :param index: python list compatible index, i.e. it may be negative to specify an entry counted from the end of the list :raise IndexError: If the entry didn't exist .. note:: This method is faster as it only parses the entry at index, skipping all other lines. Nonetheless, the whole file has to be read if the index is negative ÚrbrNr&zIndex file ended at line z , before given index was reached)ÚopenrrUÚ readlinesr�Úranger€Ú IndexError)r<rdr…ÚfpÚir>s r"Úentry_atzRefLog.entry_atßsD€õ �(˜DÑ !Ô !ð 7 RØ�qŠyˆyÝ"×,Ò,¨R¯\ª\©^¬^¸EÔ-B×-HÒ-HÑ-JÔ-JÑKÔKð 7ð 7ð 7ð 7ñ 7ô 7ð 7ð 7õ ˜5 1™9Ñ%Ô%ð hð h�Ø—{’{‘}”}�ØðhÝ$Ð%fÀÀ1ÁÐ%fÐ%fÐ%fÑgÔgÐgðhõ ×(Ò(¨¯ª©¬Ñ6Ô6ð 7ð 7ð 7ð 7ñ 7ô 7ð 7ð 7ð 7ð 7ð 7ð 7øøøð 7ð 7ð 7ð 7ð 7ð 7s‘A C!Á(A,C!Ã!C%Ã(C%có—t|¦«}t|d¬¦«| dd¬¦«} | |¦«| ¦«dS#t $r| ¦«‚wxYw)zšWrite the contents of the reflog instance to a file at the given filepath. :param filepath: path to file, parent directories are assumed to existT©Úis_file)ÚwriteroN)r r rˆÚ _serializeÚcommitÚ ExceptionÚrollback)r!rdÚlfdrŒs r"Úto_filezRefLog.to_fileþsŒ€õ�xÑ Ô ˆÝ °$Ð7Ñ7Ô7Ð7à �XŠX˜D¨ˆXÑ .Ô .ˆð Ø �OŠO˜BÑ Ô Ð Ø �JŠJ‰LŒLˆLˆLˆLøÝð ð ð à �LŠL‰NŒNˆNØ ð øøøs ¹)A$Á$ BTÚ config_readerrrÚ oldbinshaÚ newbinshar-r’c ó²—t|¦«dkst|¦«dkrtd¦«‚t|d¬¦«| d¦«d}t |t ¦«r|}nt j|¦«}tt|¦«  d¦«t|¦«  d¦«|ttj ¦«¦«tj f|f¦«} |rÉt|¦«} |  ¦«t!|d¦«} |  |  ¦« t(¦«¦«|  ¦«|  ¦«n-#|  ¦«|  ¦«wxYw| S) aAppend a new log entry to the revlog at filepath. :param config_reader: configuration reader of the repository - used to obtain user information. May also be an Actor instance identifying the committer directly or None. :param filepath: full path to the log file :param oldbinsha: binary sha of the previous commit :param newbinsha: binary sha of the current commit :param message: message describing the change to the reference :param write: If True, the changes will be written right away. Otherwise the change will not be written :return: RefLogEntry objects which was appended to the log :note: As we are append-only, concurrent access is not a problem as we do not interfere with readers.éz&Shas need to be given in binary formatTr�ú rÚasciiÚab)rIr;r rHr:rÚ committerrr rGr_Ú_timer(Úaltzoner Ú_obtain_lock_or_raiserˆr’rÚencoderrsÚ _release_lock) r<r™rdršr›r-r’Ú first_liner¡ÚentryÚlfÚfds r"Ú append_entryzRefLog.append_entrys�€õ4 ˆy‰>Œ>˜RÒ Ð ¥3 y¡>¤>°RÒ#7Ð#7ÝÐEÑFÔFÐ Få °$Ð7Ñ7Ô7Ð7Ø—]’] 4Ñ(Ô(¨Ô+ˆ Ý �m¥UÑ +Ô +ð 7Ø%ˆIˆI在 Ñ6Ô6ˆIÝå˜9Ñ%Ô%×,Ò,¨WÑ5Ô5ݘ9Ñ%Ô%×,Ò,¨WÑ5Ô5ØÝ•U”Z‘\”\Ñ"Ô"¥E¤MÐ2Øð  ñ ô ˆð ð #ݘ(Ñ#Ô#ˆBØ × $Ò $Ñ &Ô &Ð &Ý�h Ñ%Ô%ˆBð #Ø—’˜Ÿš™œ×.Ò.­vÑ6Ô6Ñ7Ô7Ð7à—’‘ ” � Ø× Ò Ñ"Ô"Ð"Ð"øð—’‘ ” � Ø× Ò Ñ"Ô"Ð"Ð"øøøàˆ s Å?F*Æ**Gcóf—|j€td¦«‚| |j¦«|S)zUWrite this instance's data to the file we are originating from :return: selfNzBInstance was not initialized with a path, use to_file(...) instead)rcr;r˜r s r"r’z RefLog.writeHs4€ð Œ:Ð ÝÐaÑbÔbÐ bà � Š �T”ZÑ Ô Ð Øˆ r$cóˆ—|j}|D]7}|| ¦« t¦«¦«Œ8|Srf)r’rr¥r)r!ror’Úes r"r“zRefLog._serializeUsH€Ø” ˆðð -ð -ˆAØ ˆE�!—(’(‘*”*×#Ò#¥FÑ+Ô+Ñ ,Ô ,Ð ,Ð ,àˆ r$cóV—| | |¦«¦«|Srf)Úextendr„)r!ros r"rrzRefLog._deserialize^s'€Ø � Š �D×%Ò% fÑ-Ô-Ñ.Ô.Ð.àˆ r$rf)rN)T)rr)rorrr)rVrWrXrYr\rrrhrmrlr`rvr]r~rrrr„r_rŽr˜rraÚboolr«r’r“rrÚ __classcell__)rjs@r"rr�s]ø€€€€€ðRðRð€Iðð˜u X¨t ^Ô4ðÀððððððð#ð#  x° ~Ô!6ð#ð#ð#ð#ð ð ð ð ð ð ð¨hðððñ„[ðððLÐ*ðL¨sðLðLðLñ„[ðLðð* %¨¨Y¸Ð(<Ô"=ð*À(È;ÔBWð*ð*ð*ñ„[ð*ð*ð7 ð7°ð7¸ð7ð7ð7ñ„[ð7ð< ð¨Tððððð"ðð6ð6à˜UÐ$5Ð7JÈDÐPÔQð6ðð6ðð 6ð ð 6ð ð 6ðð6ð ð6ð6ð6ñ„[ð6ðpðððððððððððððððr$))rrZr(r¢Ú git.compatrÚgit.objects.utilrrrÚgit.utilrr r r r r rÚos.pathr~rzÚtypingrrrrrÚ git.typesrÚgit.refsrÚiorÚ git.configrrÚ__all__r]r_rrrr$r"úr½sðØÐÐÐÐÐØ € € € ØÐÐÐàÐÐÐÐÐððððððððððð ððððððððððððððððððÐÐÐÐÐð ?Ð>Ð>Ð>Ð>Ð>Ð>Ð>Ð>Ð>Ð>Ð>Ð>Ð>àÐÐÐÐÐàð>Ø*Ð*Ð*Ð*Ð*Ð*ØÐÐÐÐÐØ=Ð=Ð=Ð=Ð=Ð=Ð=Ð=ð �]Ð #€ðdRðdRðdRðdRðdR�%˜˜S %¨¨s°C¨x¬¸#Ð=Ô>ñdRôdRðdRðNRðRðRðRðRˆT�+Ô   ñRôRðRðRðRr$