Ë .8 s=Ý@÷ãó—ddlZddlZddlmZmZmZddlmZmZm Z m Z m Z ddl m Z e jZdZGd„dej «ZGd „d ej$e«Zy) éN)ÚbinÚhexÚnullrev)ÚancestorÚcontextÚerrorÚphasesÚutilé)Ú shallowutilgà?có´‡—eZdZ dˆfd„ Zd„Zed„«Zdd„Zd„Zed„«Z d„Z d„Z d „Z d „Z d „Zd „Zdd „Zd„Zd„Zdd„Zd„Zˆfd„Zd„ZˆxZS)Ú remotefilectxc󤕗|tk(r |j}|rt|«dk(r t|«}tt |�||||||«||_y)Né()rÚnullidÚlenrÚsuperrÚ__init__Ú _ancestormap) ÚselfÚrepoÚpathÚchangeidÚfileidÚfilelogÚ changectxÚ ancestormapÚ __class__s €úEusr/lib/python3.12/site-packages/hgext/remotefilelog/remotefilectx.pyrzremotefilectx.__init__sSø€ð ”WÒ Ø—[‘[ˆFÙ ”c˜&“k RÒ'ܘ“[ˆFÜ Œm˜TÑ+Ø �$˜ &¨'°9ô ð(ˆÕócóL—|jj|j«S©N)Ú_filelogÚsizeÚ _filenode©rs rr$zremotefilectx.size-s€Ø�}‰}×!Ñ! $§.¡.Ó1Ð1r có —d|jvr |jSd|jvr|jj«Sd|jvro|j |j |j |j|j«}|jj«jj|«S|j«S)NÚ _changeidÚ _changectxÚ_descendantrev) Ú__dict__r(r)ÚrevÚ_adjustlinknodeÚ_pathr#r%r*Ú_repoÚ unfilteredÚ changelogÚlinkrev)rÚlinknodes rr(zremotefilectx._changeid0s¢€à ˜$Ÿ-™-Ñ 'Ø—>‘>Ð !Ø ˜TŸ]™]Ñ *Ø—?‘?×&Ñ&Ó(Ð (Ø  §¡Ñ .ð×+Ñ+Ø— ‘ ˜DŸM™M¨4¯>©>¸4×;NÑ;NóˆHð—:‘:×(Ñ(Ó*×4Ñ4×8Ñ8¸ÓBÐ Bà—<‘<“>Ð !r có^—t|j|j||j|¬«S)zMopens an arbitrary revision of the file without opening a new filelog)rrr)rr/r.r#)rrrs rÚfilectxzremotefilectx.filectx@s,€ôØ �J‰JØ �J‰JØØ—M‘MØô  ð r có—|jSr")Ú_linkrevr&s rr2zremotefilectx.linkrevKs €Ø�}‰}Ðr có�—|j|jjk(rtS|j «}||j\}}}}|jj j j|«}|�|S|j}|j}|jj«j } |jj} tt| «dz dd«D]X}| j|«} | j| «} || dvsŒ-|| | dj«j!|«k(sŒV|cSy)Nr réÿÿÿÿé)r%r/rrrr1ÚindexÚget_revr.r0Ú manifestlogÚrangerÚnodeÚreadÚreadfastÚget) rrÚp1Úp2r3Úcopyfromr,rrÚclÚmflr?Údatas rr7zremotefilectx._linkrevNs€à �>‰>˜TŸZ™Z×.Ñ.Ò .܈Nà×&Ñ&Ó(ˆ Ø%0°·±Ñ%@Ñ"ˆˆB�˜(Ø�j‰j×"Ñ"×(Ñ(×0Ñ0°Ó:ˆØ ˆ?؈Jð�z‰zˆØ—‘ˆØ �Z‰Z× "Ñ "Ó $× .Ñ .ˆØ�j‰j×$Ñ$ˆäœ˜R› 1™ a¨Ö,ˆCØ—7‘7˜3“<ˆDØ—7‘7ØóˆDð�t˜A‘wŠð˜S  a¡™\×2Ñ2Ó4×8Ñ8¸Ó>Ó>Ø’Jð-ðr cóJ—|j«}t|«}d|vxsd|v }|s|j«|k(r|S|j|j|j |j |j«d¬«}|jjj|«S)areturn the rev of the changeset which introduced this file revision This method is different from linkrev because it take into account the changeset the filectx was created from. It ensures the returned revision is one of its ancestors. This prevents bugs from 'linkrev-shadowing' when a file revision is used by multiple changesets. r(r)T©Ú inclusive) r2Úvarsr,r-r.r#r%r/r1)rÚlkrÚattrsÚnoctxr3s rÚintrorevzremotefilectx.introrevns—€ð�l‰l‹nˆÜ�T“ ˆØ  EÐ)ÒC¨]¸eÐ-CÐDˆÙ �D—H‘H“J #Ò%؈JØ×'Ñ'Ø �J‰JØ �M‰MØ �N‰NØ �H‰H‹JØð (ó ˆð�z‰z×#Ñ#×'Ñ'¨Ó1Ð1r cóx—|j«}||j\}}}}|sy||f}|j«|j«k(r|S|j «}|j}|j j «D]} || j|«k(ryŒ|S#tj$rYŒ3wxYw)a#check if file was actually renamed in this changeset revision If rename logged in file revision, we report copy for changeset only if file revisions linkrev points back to the changeset in question or both changeset parents contain different file revisions. N) rr%r,r2rr)ÚparentsÚfilenoderÚ LookupError) rrrCrDr3rEÚrenamedÚnameÚfnodeÚps rrUzremotefilectx.renamed…s»€ð×&Ñ&Ó(ˆ à%0°·±Ñ%@Ñ"ˆˆB�˜(ÙØà˜R�.ˆØ �8‰8‹:˜Ÿ™›Ò '؈Nà�y‰y‹{ˆØ—‘ˆØ—‘×(Ñ(Ö*ˆAð Ø˜AŸJ™J tÓ,Ò,Ùð-ð+ð ˆøô×$Ñ$ò Ùð ús B#Â#B9Â8B9có4—|j«}|xr|dS)Nr)rU)rÚcopys rÚ copysourcezremotefilectx.copysource s€Ø�|‰|‹~ˆØÒ˜˜Q™Ðr cóŽ—|js.|j«j|j«|_|jSr")rrrr%r&s rrzremotefilectx.ancestormap¤s4€Ø× Ò Ø $§ ¡ £× :Ñ :¸4¿>¹>Ó JˆDÔ à× Ñ Ð r cóú—|j}|j«}||j\}}}}g}||jk7rW|xs |j}|j |«} t |||| |¬«} |j«| _|j| «||jk7rS|j}|j |«} t |||| |¬«} |j«| _|j| «|S)N)rrr) r/rr%rr.Úfilerr,r*Úappend) rrrrCrDr3rEÚresultsrÚflogÚp1ctxÚp2ctxs rrRzremotefilectx.parentsªs倨�z‰zˆØ×&Ñ&Ó(ˆ à%0°·±Ñ%@Ñ"ˆˆB�˜(ØˆØ �—‘Ò ØÒ)˜tŸz™zˆDØ—9‘9˜T“?ˆDÜ!Ø�d 2¨tÀôˆEð$(§8¡8£:ˆEÔ Ø �N‰N˜5Ô !à �—‘Ò Ø—:‘:ˆDØ—9‘9˜T“?ˆDÜ!Ø�d 2¨tÀôˆEð$(§8¡8£:ˆEÔ Ø �N‰N˜5Ô !àˆr có®—|j|«}|d|d}}||vr6|||j«j|«k(r|j|«Sy)zBreturns the node for in if content matches rr:N)r@rArBr?) rÚancrevrFrGrrWÚancctxÚ manifestnodeÚfiless rÚ_nodefromancrevzremotefilectx._nodefromancrevÄsZ€à—‘˜“ˆØ$ Q™i¨°©�eˆ ð �5‰=˜U c¨,Ñ&7×&@Ñ&@Ó&B×&FÑ&FÀtÓ&LÒLØ—7‘7˜6“?Ð "Ør c óœ—|j}|j«j}|j}|j «} | |d} |€;|jdj «D� cgc]} | j «‘Œ} } d}n|g} |j| | «r| Sdj| D� cgc]} t|j| ««‘Œc} «t|«|tj|j«tj|j«dœ}|jjdi|¤Ž|j }d}|j#| |¬«}|D]a}|j%|||||«}|�|cS|rŒ!|j'||«t(j*k(sŒE|j-|||| |«}|r|cSd}Œc| Scc} wcc} w) a…return the first ancestor of introducing If the linkrev of the file revision does not point to an ancestor of srcrev, we'll walk down the ancestors until we find one introducing this file revision. :repo: a localrepository object (used to access changelog and manifest) :path: the file path :fnode: the nodeid of the file revision :filelog: the filelog of this path :srcrev: the changeset revision we search ancestors from :inclusive: if true, the src revision will also be checked Note: This is based on adjustlinkrev in core, but it's quite different. adjustlinkrev depends on the fact that the linkrev is the bottom most node, and uses that as a stopping point for the ancestor traversal. We can't do that here because the linknode is not guaranteed to be the bottom most one. In our code here, we actually know what a bunch of potential ancestor linknodes are, so instead of stopping the cheap-ancestor-traversal when we get to a linkrev, we stop when we see any of the known linknodes. éNTó )ÚrevsrWÚfilepathÚuserÚreponameFrJ)ó linkrevfixupsadjusting linknode )r/r0r1r=rrRr,Ú_verifylinknodeÚjoinrr?r Ú getusernameÚuiÚ getreponameÚlogÚ _phasecacheÚ ancestorsriÚphaser ÚpublicÚ_forceprefetch)rrrrWÚsrcrevrKrrFrGrr3rXrmr,ÚcommonlogkwargsÚpcÚ seenpublicÚiterancreÚlnodes rr-zremotefilectx._adjustlinknodeÎs»€ð2�z‰zˆØ �_‰_Ó × (Ñ (ˆØ×шØ×&Ñ&Ó(ˆ ؘuÑ% aÑ(ˆà ˆ>à%)§Z¡Z°Ñ%5×%=Ñ%=Ô%?Ó@Ñ%? �A—E‘E•GÐ%?ˆDÐ@؉Ià�8ˆDà × Ñ   hÔ /؈Oð—I‘I¹DÓA¹D°Sœs 2§7¡7¨3£<Õ0¸DÑAÓBܘ“ZØÜ×+Ñ+¨D¯G©GÓ4Ü#×/Ñ/°·±Ó8ñ  ˆð ˆ�‰� ‰ ÑPÀÒPà × Ñ ˆØˆ Ø—,‘,˜t¨y�,Ó9ˆÛˆFà×(Ñ(¨°°S¸$ÀÓFˆEØÐ Ø’ ò  "§(¡(¨4°Ó"8¼F¿M¹MÓ"Ið×+Ñ+ؘ$  t¨_ó�ñØ ’LØ!‘ ð%ð(ˆùòSAùòBs Á,GÂ.!G có—d}tj«} |jj|t|«fgd¬«d|_|j «|d}|j ||«rAd}|tj«|z } |jjd|dzfd| d zi|¤ŽSd } tj«|z } |jjd|dzfd| d zi|¤Žy#t$rL} d | z}Yd} ~ tj«|z } |jjd|dzfd| d zi|¤Žyd} ~ wwxYw#tj«|z } |jjd|dzfd| d zi|¤ŽwxYw) Nr T)Úforcerks#remotefilelog prefetching succeededrqó Úelapsediès#remotefilelog prefetching not founds%remotefilelog prefetching failed (%s)) ÚtimeÚ fileserviceÚprefetchrrrrrrurwÚ Exception) rrrrWrmr~ÚlogmsgÚstartr3r†Úes rr|zremotefilectx._forceprefetchs¹€ðTˆÜ— ‘ “ ˆð Ø × Ñ × %Ñ %¨¬c°%«jÐ'9Ð&:À$Ð %Ô Gð !%ˆDÔ Ø×'Ñ'Ó)¨%Ñ0°Ñ3ˆHØ×#Ñ# D¨(Ô3Ø?�Øô—i‘i“k EÑ)ˆGØ ˆD�G‰G�K‰KØØ˜‘ñ ð  $™ð ð"ó  ð<ˆFØô —i‘i“k EÑ)ˆGØ ˆD�G‰G�K‰KØØ˜‘ñ ð  $™ð ð"ó  øô ò Ø=ÀÑAˆFÛä—i‘i“k EÑ)ˆGØ ˆD�G‰G�K‰KØØ˜‘ñ ð  $™ð ð"ó  ûð  ûô—i‘i“k EÑ)ˆGØ ˆD�G‰G�K‰KØØ˜‘ñ ð  $™ð ð"ó  ús0˜AC2Â1C2Ã2 EÃ;EÄE ÅEÅE Å ?F c󲇇—|sy |jj«jŠtˆˆfd„|D««S#tj $rYywxYw)aÚ Check if a linknode is correct one for the current history. That is, return True if the linkrev is the ancestor of any of the passed in revs, otherwise return False. `revs` is a list that usually has one element -- usually the wdir parent or the user-passed rev we're looking back from. It may contain two revs when there is a merge going on, or zero revs when a root node with no parents is being created. Fc3ó`•K—|]%}‰j‰‰j|««–—Œ'y­wr")Ú isancestorr?)Ú.0ÚrrFr3s €€rÚ z0remotefilectx._verifylinknode..ps%øèø€ÐIÁD¸q�r—}‘} X¨r¯w©w°q«z×:ÁDùsƒ+.)r/r0r1ÚanyrrT)rrmr3rFs `@rrrzremotefilectx._verifylinknode_sSù€ñØð à—‘×&Ñ&Ó(×2Ñ2ˆBÜÔIÁDÓIÓIÐ IøÜ× Ñ ò ñ ð  ús‡8AÁAÁAc#ó¶K—g}tj|f«}t«}|r†|j«}|j «|vrŒ%|j |j ««|j |«|j«}d}|D]}|s|s|j |«d}Œ|rŒ†|jd«t|dd„¬«}|D]} | –—Œy­w)NTFrcó"—|j«Sr")r2)Úxs rÚz)remotefilectx.ancestors..�s €À!Ç)Á)Ä+r )ÚreverseÚkey) Ú collectionsÚdequeÚsetÚpoprSÚaddr_rRÚsorted) rÚ followfirstryÚqueueÚseenÚcurrentrRÚfirstrXrs rryzremotefilectx.ancestorsxsÌèø€Øˆ Ü×!Ñ! 4 'Ó*ˆÜ‹uˆÙØ—i‘i“kˆGØ×ÑÓ! TÑ)ØØ �H‰H�W×%Ñ%Ó'Ô (à × Ñ ˜WÔ %à—o‘oÓ'ˆG؈EÛ�Ù¡ Ø—L‘L ”OØ‘ðòð � ‰ �aÔô˜9¨dÑ8MÔNˆ ã!ˆHØ‹Nñ"ùs ‚B*CÂ-,Ccó®‡ ‡ —|j«|j«k(r%|j«|vr||j«S|j«|vr%|j«|vr||j«S|j«|vr%|j«|vr||j«S|j«Š |j«Š ˆ ˆ fd„}|j«|j«f}|j«|j«f}tj|||«}|r |\}}t |j ||‰ ¬«} | Sy)Nc󈕗|\}}‰j|«xs‰j|«}|sgS|dxs||df||dfgS)Nr:rr )rB)r—ÚfÚnrXÚamapÚbmaps €€rrRz'remotefilectx.ancestor..parents¥sRø€Ø‰DˆAˆqØ—‘˜“ Ò*˜tŸx™x¨›{ˆAÙØ� à�q‘T’Y˜Q  !¡Ð%¨¨1¨Q©4 yÐ1Ð 1r )rr)rrrSrÚgenericancestorrr/) rÚfc2ÚactxrRÚaÚbÚresultr¨r©r’rªr«s @@rrzremotefilectx.ancestor•sù€à �8‰8‹:˜Ÿ™›Ò $¨¯©«¸Ñ)<ؘŸ ™ › Ñ$Ð $ð �9‰9‹;˜$Ñ  3§8¡8£:°TÑ#9ؘŸ ™ › Ñ$Ð $Ø �8‰8‹:˜Ñ  $§)¡)£+°TÑ"9ؘŸ™› Ñ#Ð #ð×ÑÓ!ˆØ�‰Ó ˆõ 2ð�Y‰Y‹[˜$Ÿ-™-›/Ð *ˆØ �X‰X‹Z˜Ÿ™›Ð (ˆÜ×)Ñ)¨!¨Q°Ó8ˆÙ ؉DˆAˆqܘdŸj™j¨!°AÀ4ÔHˆA؈Hàr cóî•—|}|jdd«}|rf|j«}|j«|k7rCt|j|j ||j |j|j¬«}g}t«}tj|f«}|j|j««|rË|j«} | j«|j«k7r8|j| j!«t#| j««f«|r| |vrŒr| j%«D]E} | j«|vsŒ|j| j««|j| «ŒG|rŒË|jj&j)dt+|«z«|r%|jj,j/|«t1t|�f|i|¤ŽS)NÚ prefetchskip)rrrrs1remotefilelog: prefetching %d files for annotate )ržrPr,rr/r.r%r#rr�r›rœrŸr?rSr_rrrRruÚdebugrrˆr‰rÚannotate) rÚargsÚkwargsÚintroctxr³rPÚfetchr£r¢r¤Úparentrs €rrµzremotefilectx.annotate·s�ø€ØˆØ—z‘z .°$Ó7ˆ Ù à—}‘}“ˆHØ�x‰x‹z˜XÒ%Ü(Ø—J‘JØ—J‘JØ%ØŸ>™>Ø ŸM™MØ $× 1Ñ 1ô �ðˆÜ‹uˆÜ×!Ñ! 8 +Ó.ˆØ �‰�—‘“Ô!ÙØ—i‘i“kˆGØ×ÑÓ! T§]¡]£_Ò4ð— ‘ ˜gŸl™l›n¬c°'×2BÑ2BÓ2DÓ.EÐFÔGÙ ¨<Ñ 7ØØ!Ÿ/™/Ö+�Ø—;‘;“=¨Ò,Ø—H‘H˜VŸ[™[›]Ô+Ø—L‘L Õ(ð,òð � ‰ � ‰ ×Ñð Ü # E£ ñ +ô ñ Ø �J‰J× "Ñ "× +Ñ +¨EÔ 2Ü”] DÑ2°DÐC¸FÑCÐCr có—gSr"©r&s rÚchildrenzremotefilectx.childrenãs€Øˆ r )NNNNNr")F)Ú__name__Ú __module__Ú __qualname__rr$Ú propertycacher(r5r2r7rPrUr[rrRrir-r|rrryrrµr½Ú __classcell__©rs@rrrs˜ø„ð ØØØØõ(ò&2ðñ "óð "ó  òðñóðò>2ò.ò6 ò!ò ò4óJòXCòJó2ò: ôD)DöXr rcó,‡—eZdZdˆfd„ Zd„Zd„ZˆxZS)Úremoteworkingfilectxcó@•—d|_tt|�||||«yr")rrrÅr)rrrrÚ workingctxrs €rrzremoteworkingfilectx.__init__ès$ø€Ø ˆÔÜ Ô" DÑ2Ø �$˜ õ r có,—tj|«Sr")rrRr&s rrRzremoteworkingfilectx.parentsîs€Ü×$Ñ$ TÓ*Ð*r cóì—|j�sÜ|j}|jj}|j «}|r|}n5||dj j ||jj«f}||jjf}t|«dkDr5||dj j ||jj«f}i}|d|jjk7rT|jj|d|d¬«}|j|j«j|d««|d|jjk7rT|jj|d|d¬«}|j|j«j|d««d} |r|d} |d|d|jj| f|d<||_|jS)Nrr )rr )rr.r)Ú_parentsrUÚ _manifestrBr/rrr5Úupdaterr) rrÚpclrUrCrDÚmrbrcrEs rrz remoteworkingfilectx.ancestormapñs©€Ø× Ó Ø—:‘:ˆDØ—/‘/×*Ñ*ˆCØ—l‘l“nˆGáØ‘à˜C ™F×,Ñ,×0Ñ0°°t·z±z×7HÑ7HÓIÐJ�à˜Ÿ ™ ×)Ñ)Ð*ˆBÜ�3‹x˜!Š|ؘC ™F×,Ñ,×0Ñ0°°t·z±z×7HÑ7HÓIÐJ�àˆAØ�!‰u˜Ÿ ™ ×)Ñ)Ò)ØŸ ™ ×*Ñ*¨2¨a©5¸¸A¹Ð*Ó?�Ø—‘˜Ÿ™›×4Ñ4°R¸±UÓ;Ô<à�!‰u˜Ÿ ™ ×)Ñ)Ò)ØŸ ™ ×*Ñ*¨2¨a©5¸¸A¹Ð*Ó?�Ø—‘˜Ÿ™›×4Ñ4°R¸±UÓ;Ô<àˆHÙØ" 1™:�ؘ!‘u˜b ™e T§Z¡Z×%6Ñ%6¸ÐAˆAˆd‰GØ !ˆDÔ à× Ñ Ð r )NN)r¾r¿rÀrrRrrÂrÃs@rrÅrÅçsø„õ ò +ö!r rÅ)r›r‡Úmercurial.noderrrÚ mercurialrrrr r Úr rÁÚFASTLOG_TIMEOUT_IN_SECSr5rÚworkingfilectxrÅr¼r rÚrÔsZðóÛ ç,Ñ,÷õõà×"Ñ"€ ØÐôK�G—O‘OôKô\(!˜7×1Ñ1°=õ(!r