Ë V‰Ä»`w%AãóT—ddlZddlZddlmZddlmZddlmZm Z m Z m Z ddl m Z ddlmZmZe j$d«Zd „Zd „Zd „Zd(d „Zd(d „Zd„Zd„Zd„Zd„Zd„Zd„ZdZdZ dZ!d„Z"d„Z#d„Z$d„Z%d„Z&d)d„Z'd„Z(d„Z)d(d„Z*d„Z+d„Z,d „Z-Gd!„d"«Z.d#„Z/d$„Z0d%„Z1d&„Z2d'„Z3y)*éNé)Ú_)Únullrev)ÚmatchÚpathutilÚpolicyÚutil)Ú stringutil)ÚflagutilÚsidedataÚ copy_tracingcóx—t|j««D]\}}||k(r||=Œ||vr||=Œ||vsŒ||=Œ y)z)filters out invalid copies after chainingN)ÚlistÚitems)ÚsrcÚdstÚtÚkÚvs ú4usr/lib/python3.12/site-packages/mercurial/copies.pyÚ_filterr"sF€ô,�Q—W‘W“Y–‰ˆˆ1Ø �Š6Ø�!‘Ø �c‰\à�!‘Ø �cŠ\à�!‘ñ ócó€—|j«}|j«D]\}}|j||«||<Œ|S)z.chain two sets of copies 'prefix' and 'suffix')ÚcopyrÚget)ÚprefixÚsuffixÚresultÚkeyÚvalues rÚ_chainr!Cs:€à �[‰[‹]€FØ—l‘l–n‰ ˆˆUØ—j‘j ¨Ó.ˆˆsŠ ð%à €Mrcóð—|j«D]c}|j«}|j|d«|j«k(r|cS|sŒ=|j|d«|j«k(sŒa|cSy)a return file context that is the ancestor of fctx present in ancestor manifest am Note: we used to try and stop after a given limit, however checking if that limit is reached turned out to be very expensive. we are better off disabling that feature.N)Ú ancestorsÚpathrÚfilenode)ÚfctxÚamÚbasemfÚfr$s rÚ _tracefiler*Ks^€ð�^‰^Ö ˆØ�v‰v‹xˆØ �6‰6�$˜Ó  §¡£Ò -ØŠKÚ �f—j‘j  tÓ,°· ± ³ Ó<ØŠKñ rcóΗ|j}|j«j«}t|«D],}|j |«j r |sŒ!||«rŒ*||=Œ.|S©N)ÚdirstateÚcopiesrrÚ get_entryÚtracked)ÚreporÚdsÚcrs rÚ_dirstatecopiesr4[sT€Ø �‰€BØ � ‰ ‹ ×ÑÓ€AÜ �!ŽWˆØ�|‰|˜A‹×&Ò&ª5¹¸q½Ø�!‘ðð €Hrcóh—|j«}|j«}|j||¬«S)z¬Computes which files are in b but not a. This is its own function so extensions can easily wrap this call to see what files _forwardcopies is about to process. ©r)ÚmanifestÚ filesnotin)ÚaÚbrÚmaÚmbs rÚ_computeforwardmissingr=ds-€ð �‰‹€BØ �‰‹€BØ �=‰=˜ 5ˆ=Ó )Ð)rcóf—|jdk(ry|jjdd«}d}||vS)z9Checks if we should use changeset-centric copy algorithmsóchangeset-sidedataTó experimentalscopies.read-from)schangeset-onlys compatibility)ÚfilecopiesmodeÚuiÚconfig)r1ÚreadfromÚchangesetsources rÚusechangesetcentricalgorFns9€à ×ÑÐ3Ò3ØØ�w‰w�~‰~˜oÐ/BÓC€HØ;€OØ �Ð &Ð&rcó†—|j}t|«r t|||«S|jjxr|jj dd«}|jj }|r |d||fz«|j«}|€dn|j«}i} |} |j«|k(r^|j«j«tk(r9tj|j««} tj|| «} |jj dd«r1t!|j#|««} |r9|dt%| «z«n$t'||| ¬«} |r|dt%| «z«|jj(j+|j«gd ¬ «} t-| «D]u}|r |d |z«||}| |_|rt1j2«}t5|||«}|r|r |d |z«|| |<|sŒV|d t1j2«z z«Œw| S)z@Like _forwardcopies(), but b.rev() cannot be None (working copy)ódeveló debug.copiess3debug.copies: looking into rename from %s to %s Nscopy-tracing.trace-all-filess+debug.copies: searching all files: %d r6s/debug.copies: missing files to search: %d T©Ú inclusives&debug.copies: tracing file: %s s%debug.copies: rename of: %s s(debug.copies: time: %f seconds )Ú_reporFÚ_changesetforwardcopiesrBÚ debugflagÚ configboolÚdebugr7Úp1Úp2ÚrevrÚmatchmodÚexactÚfilesÚintersectmatchersrÚwalkÚlenr=Ú changelogr#ÚsortedÚ_ancestrycontextr Útimerr*)r9r:Úbaserr1rPÚdbgr'r(ÚcmÚforwardmissingmatchÚ filesmatcherÚmissingÚancestrycontextr)r&ÚstartÚopaths rÚ_committedforwardcopiesrgwsü€ð �7‰7€Dä˜tÔ$Ü& q¨!¨UÓ3Ð3à �G‰G× Ñ Ò O $§'¡'×"4Ñ"4°X¸Ó"O€EØ �'‰'�-‰-€CÙ Ù Ð CÀqÈ!ÀfÑ LÔMØ �‰‹€BØ�\‰T t§}¡}£€Fð €Bð ÐØ‡t�tƒv�‚{�q—t‘t“v—z‘z“|¤wÒ.Ü—~‘~ a§g¡g£iÓ0ˆ Ü&×8Ñ8¸À ÓMÐØ ‡w�w×ј(Ð$CÔDÜ�q—v‘v˜e“}Ó%ˆá Ù Ð?Ä#ÀgÃ,ÑNÕ Oä(¨¨AÐ5HÔIˆÙ Ù ØCÜ�g“,ñô ð —g‘g×'Ñ'×1Ñ1°1·5±5³7°)ÀtÐ1ÓL€Oä �GŽ_ˆÙ Ù Ð:¸QÑ>Ô ?Ø�‰tˆØ /ˆÔá Ü—J‘J“LˆEܘ4  VÓ,ˆÙ ÙÙÐ=ÀÑEÔF؈Bˆq‰EÚ Ù Ø<Ü—:‘:“< %Ñ'ñ)õ ðð$ €Irc󾇇‡‡—|j}|jŠ|jŠtjŠ|j Št � ˆˆˆˆfd„}|Sˆˆˆˆfd„}|S)zÁreturns a function that returns the following data given a " * p1: revision number of first parent * p2: revision number of first parent * changes: a ChangingFiles object cóž•—‰|«\}}‰|«‰zr0‰|«jjtj«}nd}|||fSr,)Ú _sidedatarÚ sidedatamodÚSD_FILES)rSrQrRÚrawÚ HASCOPIESINFOÚchangelogrevisionÚflagsÚparentss €€€€rÚrevinfoz _revinfo_getter..revinfoËsNø€Ù˜S“\‰FˆB�Ù�S‹z˜MÒ)Ù'¨Ó,×6Ñ6×:Ñ:¼;×;OÑ;OÓP‘à�ؘ˜C�=Ð rcód•—‰|«\}}‰|«‰zr‰|«j}nd}|||fSr,)Úchanges)rSrQrRrtrnrorprqs €€€€rrrz _revinfo_getter..revinfoÕs>ø€Ù˜S“\‰FˆB�Ù�S‹z˜MÒ)Ù+¨CÓ0×8Ñ8‘à�ؘ˜GÐ$Ð $r)rZÚ parentrevsrpr ÚREVIDX_HASCOPIESINFOroÚrustmod)r1rÚclrrrnrorprqs @@@@rÚ_revinfo_getterryºsUû€ð �‰€BØ�m‰m€GØ �H‰H€Eä×1Ñ1€Mà×,Ñ,ÐäÐ÷ !ð$ €N÷ %ð €Nrc󇇗iŠˆˆfd„}|S)z&return a cached version of is_ancestorcój•—||kDry||k(ry||f}‰j|«}|€‰||«x}‰|<|S)NFT)r)ÚancÚdescrÚretÚcacheÚ is_ancestors €€rÚ _is_ancestorz(cached_is_ancestor.._is_ancestoräsLø€Ø �Š:ØØ �DŠ[ØØ�DˆkˆØ�i‰i˜‹nˆØ ˆ;Ù*¨3°Ó5Ð 5ˆC�%˜‘*؈ r©)r€r�rs` @rÚcached_is_ancestorrƒàsù€à €Eõ ð Ðrc ód—|j«t|j«fvriS|j«j«}|j}|j }|j }ttf}|j|j«gd¬«}|j|j«g|j«g¬«} t«} d} |jjdd«} | D]U} || «}||k(rd} Œ|\}}|tk7r||vr| j|«|tk7sŒ@||vsŒE| j|«ŒW| siS| r[t| «} t| «}|j«g}|j||| d¬«}t|«}| D� cgc] } | |vsŒ| ‘Œ } } |j dk(rŸt#d „| D««}| D]9} |j%| «D]#}|tk(rŒ d || <||vsŒ||xxd z cc<Œ%Œ;t'||«}|jj)«5t+| ||j«|||| «cddd«St#d „| D««}| D]@} |j%| «D]*}|tk(rŒ g|| <||vsŒ||j-| «Œ,ŒB| j/«}||j«k(sJ‚| j1| «| j3«t5|«}t7| ||j«|||«Scc} w#1swYyxYw) NTrJ)ÚcommonÚheadsFrHscopy-tracing.multi-thread)Ú includepathr?c3ó$K—|]}|df–—Œ y­w)rNr‚©Ú.0Úrs rÚ z*_changesetforwardcopies..5sèø€Ð4©e¨˜q !œf©eùó‚rrc3ó$K—|]}|gf–—Œ y­wr,r‚r‰s rrŒz*_changesetforwardcopies..Ksèø€Ð/© A˜˜Bœ©ùr�)rSrr1Ú unfilteredrZÚ isancestorrevÚ_uncheckedparentrevsr#ÚfindmissingrevsÚsetrBrOÚaddrÚminÚreachablerootsrAÚdictruryÚreadingÚ_combine_changeset_copiesÚappendÚpopÚextendÚsortÚ_revinfo_getter_extraÚ_combine_changeset_copies_extra)r9r:rr1rxÚ isancestorrqÚ graph_rootsr#ÚrevsÚrootsÚhas_graph_rootsÚ multi_threadr‹ÚpsrQrRÚmÚhÚ roots_to_headÚchildren_countÚprrÚchildrenÚxs rrMrMòs€Ø‡u�uƒw”7˜AŸE™E›GÐ$Ñ$؈ à �6‰6‹8× Ñ Ó €Dà �‰€BØ×!Ñ!€Jð×%Ñ%€GÜœGÐ$€Kà— ‘ ˜aŸe™e›g˜Y°$� Ó7€IØ × Ñ  a§e¡e£g Y°q·u±u³w°iÐ Ó @€DÜ ‹E€EØ€OØ—7‘7×%Ñ% hÐ0LÓM€LóˆÙ �Q‹ZˆØ �Ò Ø"‰Oà‰FˆB�ð”WŠ}  y¡Ø— ‘ ˜"” Ø”W‹}  y¢Ø— ‘ ˜"• ðñ àˆ Ùô�U“ ˆÜ �‹JˆØ �U‰U‹WˆIˆØ×)Ñ)¨!¨Q°À4Ð)ÓHˆ ܘMÓ*ˆ ÙÓ6™4�a 1¨ Ò#5’˜4ˆÐ6à ×ÑÐ3Ò3ôÑ4©eÓ4Ó4ˆÛˆAØ—]‘] 1Ö%�Øœ’<ØØ$%�˜qÑ!ؘÒ&Ø" 1Ó%¨Ñ*Ô%ñ &ðô" $¨Ó.ˆØ �^‰^× #Ñ #Õ %Ü,ØØØ—‘“ØØØØó÷&Ñ %ôÑ/©Ó/Ó/ˆÛˆAØ—]‘] 1Ö%�Øœ’<ØØ �˜‘ ؘ’=ؘQ‘K×&Ñ& qÕ)ñ &ðð �H‰H‹JˆØ�A—E‘E“GŠ|Ј|Ø � ‰ �EÔØ � ‰ Œ ä'¨Ó-ˆÜ.Ø �(˜AŸE™E›G W¨e°Zó ð ùòa7÷*&Ð %úsÆ L!Æ'L!È2L&Ì&L/c ó"—|j«}t�$tjt|«||||«}�n¨t |«}i} |D�]g} || «\} } } d}d| fd| ffD�]E\}}|t k(rŒ|j |«}|€Œ%|dz}|||<|r| j |d«}n| j|d«}|€ix}}n|r|j«}n|}| �¶i}|dk(r | j}n|dk(r | j}|rR|j«}|j«D])\}}|j |«}|� |d�|d}| |f||<Œ+||usJ‚| jr1| jD]"}||vsŒ||ur|j«}| df||<Œ$|€|}�Œ0|dk(sJ‚t|||| | «}�ŒH|| | <�Œji}| |}|€J‚|j«D]\}\}}|€Œ |||<Œ|s*t|j««D]}||«rŒ ||=Œ|S)a¢combine the copies information for each item of iterrevs revs: sorted iterable of revision to visit children_count: a {parent: } mapping. targetrev: the final copies destination revision (not in iterrevs) revinfo(rev): a function that return (p1, p2, p1copies, p2copies, removed) match: a matcher It returns the aggregated copies information for `targetrev`. Nré)ÚalwaysrwÚcombine_changeset_copiesrrƒrrr›rÚcopied_from_p1Úcopied_from_p2rÚremovedÚ_merge_copies_dictÚkeys)r¢rªÚ targetrevrrrr r¥Ú alwaysmatchÚ final_copiesÚ all_copiesÚ current_revrQrRrtÚcurrent_copiesÚparentÚ parent_revÚremaining_childrenr.Ú newcopiesÚ childcopiesÚdestÚsourceÚprevr)Útargetrev_itemsÚttÚfilenames rr™r™^sš€ð—,‘,“.€KäÐÜ×7Ñ7Ü �‹J˜¨ °7¸Ló Š ô(¨ Ó3ˆ àˆ äˆKÙ% kÓ2‰OˆB��GØ!ˆNð)*¨2 w°°B°Ô&8Ñ"�˜ ؤÒ(ØØ%3×%7Ñ%7¸ Ó%CÐ"Ø%Ð-ØØ" aÑ'Ð"Ø-?�˜zÑ*Ù%Ø'Ÿ^™^¨J¸Ó=‘Fà'Ÿ^™^¨J¸Ó=�Fà�>à)+Ð+�I¡Ù'Ø &§ ¡ £ ‘Ià &�IàÐ&Ø"$�KØ ’{Ø&-×&<Ñ&<™ Ø 1šØ&-×&<Ñ&<˜ á"Ø$*§K¡K£M˜ Ø,7×,=Ñ,=Ö,?™L˜D &Ø#)§:¡:¨fÓ#5˜DØ#Ð/°D¸±GÐ4GØ)-¨a© Ø/:¸FÐ.C˜I dšOð -@ð )°Ñ6Ð6Ð6Ø—’Ø!(§¤˜AØ  Iš~Ø#,°Ñ#6ð17· ± ³  IØ0;¸TÐ/B  ¨!¢ ð"1ð"Ð)Ø%.’Nð" Qš;Ð&˜;Ü%7Ø!Ø&Ø"ØØ#ó &’Nðu'9ðB'5ˆJ�{Ó #ðM ðRˆ à$ YÑ/ˆØÐ*Ð*Ð*à"1×"7Ñ"7Ö"9Ñ ˆD‘,�2�vØÑ!Ø%+� ˜TÒ"ð#:ñ ܘ\×.Ñ.Ó0Ö1ˆHÙ˜•?Ø  Ñ*ð2ð Ðrr¯cóì—|j«D]`\}}|j|«}|€|||<Œt|||||«\}} | r|tk(r ||df||<ŒG||df||<ŒR|tk(sŒ\|||<Œb|S)aÊmerge two copies-mapping together, minor and major In case of conflict, value from "major" will be picked. - `isancestors(low_rev, high_rev)`: callable return True if `low_rev` is an ancestors of `high_rev`, - `ismerged(path)`: callable return True if `path` have been merged in the current revision, return the resulting dict (in practice, the "minor" object, updated) r)rrÚ_compare_valuesÚ PICK_MAJOR) ÚminorÚmajorr rtÚ current_mergerÂr ÚotherÚpickÚ overwrites rrµrµÕs•€ð—{‘{–}‰ ˆˆeØ— ‘ ˜$“ˆØ ˆ=؈E�$ŠKä-ؘ T¨5°%ó‰OˆD�)ñØœ:Ò%Ø#0°%¸±(Ð";�E˜$’Kà#0°%¸±(Ð";�E˜$’KØœÓ#Ø#��d’ ð%ð €LrcóŠ—|\}}|\}}||k(r||k(sJ‚tdfS|�|�|€||jvrtdfS|�|�|€||jvrtdfS|||«r |�||jvrtdfStdfS|||«r |�||jvrtdfStdfS|€tdfS|€tdfStdfS)zïcompare two value within a _merge_copies_dict loop iteration return (pick, overwrite). - pick is one of PICK_MINOR, PICK_MAJOR or PICK_EITHER - overwrite is True if pick is a return of an ambiguity that needs resolution. FT)Ú PICK_EITHERÚsalvagedÚ PICK_MINORrÊÚmerged) rtr rÂrËrÌÚmajor_ttÚ major_valueÚminor_ttÚ minor_values rrÉrÉôs(€ð"Ñ€HˆkØ!Ñ€Hˆkà�8Òà˜kÒ)Ð)Ð)ܘEÐ!Ð!àÐØ Ð #Ø Ð Ø �G×$Ñ$Ñ $ô˜4ÐÐàÐØ Ð #Ø Ð Ø �G×$Ñ$Ñ $ô˜4ÐÐÙ �H˜hÔ 'Ø Ð  4¨7¯>©>Ñ#9ô˜tÐ#Ð #ä˜uÐ$Ð $Ù �H˜hÔ 'Ø Ð  4¨7¯>©>Ñ#9ô˜tÐ#Ð #ä˜uÐ$Ð $Ø Ð ä˜4ÐÐØ Ð ä˜4ÐÐô˜4ÐÐrcóT‡‡‡—‰j}|jŠˆfd„Šˆˆˆfd„}|S)aWreturn a function that return multiple data given a "i * p1: revision number of first parent * p2: revision number of first parent * p1copies: mapping of copies from p1 * p2copies: mapping of copies from p2 * removed: a list of removed files * ismerged: a callback to know if file was merged in that revision có •‡—‰|Šˆˆfd„}|S)NcóÄ•—|‰j«vry‰|}|jj|j«}d}|D]}|‰jk7sŒ|dz }Œ|dk\S)NFrrr¯)rVÚ_filelogrqÚ _filenodeÚnullid)r$r&rqÚ nb_parentsÚnÚctxr1s €€rÚismergedz=_revinfo_getter_extra..get_ismerged..ismerged>seø€Ø˜3Ÿ9™9›;Ñ&ØØ�t‘9ˆDØ—m‘m×+Ñ+¨D¯N©NÓ;ˆG؈JÛ�ؘŸ ™ Ó#Ø !‘O‘Jðð ‘?Ð "rr‚)rSrãrâr1s @€rÚ get_ismergedz+_revinfo_getter_extra..get_ismerged;sù€Ø�3‰iˆõ #ðˆrcó~•—‰|«\}}‰ |}|j\}}|j«}|||||‰|«fSr,)Ú_copiesÚ filesremoved) rSrQrRrâÚp1copiesÚp2copiesr´rärqr1s €€€rrrz&_revinfo_getter_extra..revinfoKsMø€Ù˜“‰ˆˆBØ�3‰iˆØ Ÿ[™[ш�(Ø×"Ñ"Ó$ˆØ�2�x ¨7±LÀÓ4EÐEÐEr)rZru)r1rxrrrärqs` @@rržrž.s)ú€ð �‰€BØ�m‰m€Gôö Fð €Nrc ó—i}|j«}|D�]A}|j|d«} | €i} t||«D�]\} } || «\} } }}}}|| k(rd}|}n || k(sJ‚d}|}|s,|j«D��cic]\}}||«sŒ||“Œ}}}| }|rR| j «}|j«D])\}}| j |«}|� |d�|d}| |f||<Œ+|| usJ‚|D]"}||vsŒ|| ur| j «}| df||<Œ$|j | «}|€||| <Œï|dk(rt ||||«�Œt ||||«||| <�Œ�ŒDi}||j«D]\}\}}|€Œ |||<Œ|Scc}}w)zyversion of `_combine_changeset_copies` that works with the Google specific "extra" based storage for copy informationNrr¯)r°r›Ú enumeraterrrÚ_merge_copies_dict_extra)r¢r¬r·rrrr rºr¸r‹r.Úir3rQrRrèrér´rãr½rÁrrrÀrÂrÃrÄr)Ú othercopiesr¹rÆs rrŸrŸUs€ð €JØ—,‘,“.€KÜ ˆØ—‘  4Ó(ˆØ ˆ>àˆFܘh q™k×*‰DˆAˆqÙÑ->Ô-@ôÙ-@¡  cÁEÈ#ÅJ�C˜‘HÐ-@ðñðˆIÙØ"ŸK™K›M� Ø$/×$5Ñ$5Ö$7‘L�D˜&Ø!Ÿ:™: fÓ-�DØÐ'¨D°©GÐ,?Ø!% a¡˜Ø'(¨& k�I˜d’Oð %8ð !¨Ñ.Ð.Ð.Û�ؘ ’>Ø  FÑ*ð%+§K¡K£M˜ Ø$% t 9�I˜a’Lðð%Ÿ.™.¨Ó+ˆKØÐ"Ø )� ˜1’ ð˜Q’;Ü,Ø# Y° ¸Höô-Ø! ;° ¸Hôð%.�J˜q“Mòc+ð ðp€LØ(¨Ñ3×9Ñ9Ö;ш‰lˆr�6Ø Ñ Ø!'ˆL˜Ò ð<ð Ðùó[s Á=F ÂF cóÊ—|j«D]P\}}|j|«}|€|||<Œ|d}|d}|d|dk(rŒ5||k(s|||«r ||«sŒL|||<ŒRy)zrversion of `_merge_copies_dict` that works with the Google specific "extra" based storage for copy informationNrr)rr) rËrÌr rãrÂr rÎÚnew_ttÚother_tts rrìrì›s|€ð—{‘{–}‰ ˆˆeØ— ‘ ˜$“ˆØ ˆ=؈E�$ŠKà˜1‘XˆFؘQ‘xˆHØ�Q‰x˜5 ™8Ò#Øð˜(Ò"Ù! &¨(Ô3Ù˜D•>à#��d’ ñ!%rcó—|€|}|j«j|«}|j«€>t||j «||«}t |t |j|««}|St||||«}|S)zgiven copies to context 'dst', finds renames from that context)r[r)r.rrr‹rrs rr÷r÷ÍsH€ð €AÜ�v—|‘|“~Ö&‰ˆˆ1Ù ™˜qœØ à �‰8Ø Øˆˆ!Šð 'ð €Hrcóà—|j}|jjxr|jjdd«}|r |jj d||fz«||k(s|r|siS|j «€<||j «k(r)|r|jj d«t||«S|j|«}||k(r,|r|jj d«t|||¬«}nå||k(r,|r|jj d«t|||¬«}n´|r|jj d «d}|j «tk7r|}t||«}t||||¬«} t|«t| «z} | D],} |j| «| j| «k(sŒ'|| =| | =Œ.t|||«} t| | «}t!|||«|S) z5find {dst@y: src@x} copy mapping for directed comparerHrIs-debug.copies: searching copies from %s to %s Ns$debug.copies: search mode: dirstate s#debug.copies: search mode: forward r6s$debug.copies: search mode: backward s$debug.copies: search mode: combined )rLrBrNrOrPrSrQr4Úancestorrôrørr“rr÷r!r) r­Úyrr1rPr9r.r^Úx_copiesÚy_copiesÚ same_keysrÚx_backward_renamess rÚ pathcopiesrÝs¶€à �7‰7€DØ �G‰G× Ñ Ò O $§'¡'×"4Ñ"4°X¸Ó"O€EÙ Ø �‰� ‰ Ø =ÀÀAÀÑ Fô ð ˆA‚v‘Q™a؈ ؇u�uƒw€˜1 §¡£š;Ù Ø �G‰G�M‰MÐBÔ Cä˜t UÓ+Ð+Ø � ‰ �1‹ €A؈A‚vÙ Ø �G‰G�M‰MÐAÔ BÜ  1¨EÔ2‰Ø ˆaŠÙ Ø �G‰G�M‰MÐBÔ CÜ! ! Q¨eÔ4‰á Ø �G‰G�M‰MÐBÔ CØˆØ �5‰5‹7”gÒ ØˆDÜ! ! QÓ'ˆÜ! ! Q¨°EÔ:ˆÜ˜“M¤C¨£MÑ1ˆ ÛˆAØ�|‰|˜A‹ (§,¡,¨q£/Ó1ؘQ�KؘQ‘Kðô.¨h¸¸5ÓAÐÜØ Ø ó ˆô ˆAˆq�&ÔØ €Mrcój—|r|r||k(rt«t«ifS|j«j«}|j«€K|j«|jj «k(r tt ||««t«ifS|jjdd«}tj|«durt«t«ifSt|«rt||||«S|dk(r)t|||«rt||||«St||||«St||||«S)aÒ Finds moves and copies between context c1 and c2 that are relevant for merging. 'base' will be used as the merge base. Copytracing is used in commands like rebase, merge, unshelve, etc to merge files that were moved/ copied in one merge parent and modified in another. For example: o ---> 4 another commit | | o ---> 3 commit that modifies a.txt | / o / ---> 2 commit that moves a.txt to b.txt |/ o ---> 1 merge base If we try to rebase revision 3 on revision 4, since there is no a.txt in revision 4, and if user have copytrace disabled, we prints the following message: ```other changed which local deleted``` Returns a tuple where: "branch_copies" an instance of branch_copies. "diverge" is a mapping of source name -> list of destination names for divergent renames. This function calls different copytracing algorithms based on config. r@röFs heuristics)Ú branch_copiesr1róÚnoder-rQr4rBrCr Ú parseboolrFÚ_fullcopytracingÚ_isfullcopytraceableÚ_heuristicscopytracing)r1Úc1Úc2r^róÚ copytracings rÚ mergecopiesr  s€ñB ‘R˜2 š8Ü‹¤ £°Ð3Ð3à—'‘'“)×'Ñ'Ó)€Kð ‡w�wƒyИRŸW™W›Y¨$¯-©-×*:Ñ*:Ó*<Ò<ä œ/¨$° Ó<Ó =Ü ‹OØ ð ð ð —'‘'—.‘. °,Ó?€KÜ×јKÓ(¨EÑ1ô‹¤ £°Ð3Ð3ä˜tÔ$ä  b¨"¨dÓ3Ð3ð �mÒ#ô   b¨$Ô /Ü# D¨"¨b°$Ó7Ð 7Ü% d¨B°°DÓ9Ð9ä  b¨"¨dÓ3Ð3rcó6—|j«€|j«}|j«ri|j«rY|jj dd«}t |j d|j«|j«««}||kSy)aœChecks that if base, source and destination are all no-public branches, if yes let's use the full copytrace algorithm for increased capabilities since it will be fast enough. `experimental.copytrace.sourcecommitlimit` can be used to set a limit for number of changesets from c1 to base such that if number of changesets are more than the limit, full copytracing algorithm won't be used. r@scopytrace.sourcecommitlimitó%d::%dF)rSrQÚmutablerBÚ configintrYr¢)r1r r^ÚsourcecommitlimitÚcommitss rrrQs{€ð ‡v�vƒxÐØ �U‰U‹WˆØ ‡z�z„|˜Ÿ ™ œØ ŸG™G×-Ñ-Ø Ð;ó Ðô�d—i‘i  ¨4¯8©8«:°r·v±v³xÓ@ÓAˆØÐ*Ñ*Ð*Ø rc óÞ—||vr ||vr|||<yy||vry||||k7rt||||«sy||||k7s#|j|«|j|«k7r |D]} ||| <Œ yyr,)Ú_relatedrp) rÚdsts1Úm1Úm2r<r r^rÚ renamedeleters rÚ_checksinglesidecopiesres’€ð �"�}à �b‰=à %ˆL˜Ò ð ð �B‰ð Ø ˆC‰�B�s‘GÒ ¤H¨R°©W°d¸3±iÔ$@ØØ ˆC‰�B�s‘GÒ ˜rŸx™x¨›}°·±¸³ Ò=ãˆC؈D�ŠIñð >rcó —eZdZdZ dd„Zd„Zy)ra Information about copies made on one side of a merge/graft. "copy" is a mapping from destination name -> source name, where source is in c1 and destination is in c2 or vice-versa. "movewithdir" is a mapping from source name -> destination name, where the file at source present in one context but not the other needs to be moved to destination by the merge process, because the other context moved the directory it is in. "renamedelete" is a mapping of source name -> list of destination names for files deleted in c1 that were renamed in c2 or vice-versa. "dirmove" is a mapping of detected source dir -> destination dir renames. This is needed for handling changes to new files previously grafted into renamed directories. Ncóh—|€in||_|€in||_|€in||_|€i|_y||_yr,©rrÚdirmoveÚ movewithdir)Úselfrrrrs rÚ__init__zbranch_copies.__init__�sA€ð˜,‘B¨DˆŒ Ø".Ð"6™B¸LˆÔØ$˜_‘r°'ˆŒ Ø!,Ð!4˜2ˆÕ¸+ˆÕrc óp—d|j›d|j›d|j›d|j›d� S)Nzr)rs rÚ__repr__zbranch_copies.__repr__•s,�à �I‹IØ × Ó Ø �L‹LØ × Ó ð  ð r)NNNN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r r"r‚rrrrzs„ñð&GKóFó rrc ó‡‡$‡%‡&‡'‡(—|j«Š&|j«Š'|j«Š(t||«}t||«}|s|st«t«ifSi}i}|j«D]&\}} |j | g«j |«Œ(|j«D]&\}} |j | g«j |«Œ(i} i} i} i} i}t |«t |«z}|D]Ó} |j| «}|j| «}|r�|r| ‰&vrF| ‰'vrBt |«}t |«}||zr||zD] }| | |<| | |<ŒŒat||z«| | <Œs| ‰&vsŒx| ‰'vsŒ}t |«}t |«}||zD] }| | |<| | |<ŒŒ¨|rt| |‰&‰'‰(||| | « Œ¾|sŒÁt| |‰'‰&‰(||| |« ŒÕgŠ%ˆ%ˆ&ˆ'ˆ(ˆfd„Š$ˆ$fd„}ˆ$fd„}‰jj�r¡|«}|«}d}|r2‰jjd|dzdj|«fz«|r2‰jjd|dzdj|«fz«t «}t «}| j«D]}|j|«Œ| j«D]}|j|«Œ|j«D]}|j|«Œ‰jjd «d|fd |ffD]{\}}|sŒ ‰jjd |z«t|«D]G}d }|| vs|| vr|d z }||vr|dz }||vr|dz }‰jjd||||fz«ŒIŒ}~~‰jjd«t!‰|| ||«\}}t!‰|| ||«\} }!t| | ||!«}"t| || |«}#|"|#| fS)a'The full copytracing algorithm which finds all the new files that were added from merge base up to the top commit and for each file it checks if this file was copied from another file. This is pretty slow when a lot of changesets are involved but will track all the copies. cóð•—‰so‰j‰‰ j««}‰j‰‰ j««}t||z «}t||z «}‰j||f«‰|Sr,)r8rór[rœ) ÚidxÚ addedinm1Ú addedinm2Úu1Úu2rrrr<r1s €€€€€rÚ_get_addedfilesz)_fullcopytracing.._get_addedfilesçspø€ÙØŸ ™  b¨$×*:Ñ*:Ó*<Ó=ˆIØŸ ™  b¨$×*:Ñ*:Ó*<Ó=ˆIܘ  IÑ-Ó.ˆBܘ  IÑ-Ó.ˆBØ �L‰L˜"˜b˜Ô "Ø�S‰zÐrcó•—‰d«S)Nrr‚©r.s€rÚz"_fullcopytracing..ðó ø€‘? 1Ô%rcó•—‰d«S)Nrr‚r0s€rr1z"_fullcopytracing..ñr2rs unmatched files in %ss %s: %s slocals sothersK all copies found (* = to merge, ! = divergent, % = renamed and deleted): sremotes on %s side: ró*ó!ó%s src: '%s' -> dst: '%s' %s s! checking for directory renames )r7rrrÚ setdefaultršr“rr[rrBrNrPÚjoinÚvaluesÚupdateÚ _dir_renames))r1r r r^Úcopies1Úcopies2Úinversecopies1Úinversecopies2rrÚcopy1Úcopy2ÚdivergeÚ renamedelete1Ú renamedelete2Ú allsourcesrÚdsts2Úu1fnÚu2fnr,r-ÚheaderÚrenamedeletesetÚ divergesetÚdstsÚsider.r)ÚnoteÚdirmove1Ú movewithdir2Údirmove2Ú movewithdir1Úbranch_copies1Úbranch_copies2r.rrrr<s)` @@@@@rrržs7ý€ð �‰‹€BØ �‰‹€BØ �‰‹€B䘘rÓ"€Gܘ˜rÓ"€Gá ‘wÜ‹¤ £°Ð3Ð3à€NØ€NØ—M‘M–O‰ˆˆSØ×!Ñ! # rÓ*×1Ñ1°#Õ6ð$à—M‘M–O‰ˆˆSØ×!Ñ! # rÓ*×1Ñ1°#Õ6ð$ð €EØ €EØ€GØ€MØ€MÜ�^Ó$¤s¨>Ó':Ñ:€JÛˆØ×"Ñ" 3Ó'ˆØ×"Ñ" 3Ó'ˆÙ ‘Uà˜"‰} ¨B¡ä˜E› �ܘE› �ð ˜5’=Ø$ uœ}˜Ø%(˜˜c™ Ø%(˜˜cš ñ -ô$*¨%°%©-Ó#8�G˜C’Lؘ’˜s bšyä˜E› �ܘE› �Ø  5œ=�CØ!$�E˜#‘JØ!$�E˜#’Jñ)ñ ä "Ø�U˜B  B¨¨D°%¸õ òä "Ø�U˜B  B¨¨D°%¸õ ðGðP €E÷ðó &€DÛ %€DØ ‡w�w×ÓÙ ‹VˆÙ ‹Vˆà+ˆÙ Ø �G‰G�M‰MØ 6¨HÑ#4°h·m±mÀBÓ6GÐ"HÑHô ñ Ø �G‰G�M‰MØ 6¨HÑ#4°h·m±mÀBÓ6GÐ"HÑHô ô›%ˆÜ“Uˆ Ø—N‘NÖ$ˆDØ × Ñ ˜dÕ #ð%à!×(Ñ(Ö*ˆDØ × "Ñ " 4Õ (ð+à!×(Ñ(Ö*ˆDØ × "Ñ " 4Õ (ð+ð �‰� ‰ ð +ô ð'¨Ð0°9¸gÐ2FÓG‰LˆD�&ÙØØ �G‰G�M‰MÐ-°Ñ4Ô 5ܘF–^�Ø�ؘ‘:  e¡Ø˜D‘L�Dؘ ‘?ؘD‘L�DؘÑ'ؘD‘L�DØ—‘— ‘ Ø6¸&À¹)ÀQÈÐ9MÑMõñ$ð Hð Ø à‡G�G‡M�MÐ7Ô8ä)¨$°°E¸7ÀDÓIÑ€HˆlÜ)¨$°°E¸7ÀDÓIÑ€Hˆlä" 5¨-¸À<ÓP€NÜ" 5¨-¸À<ÓP€Nà ˜>¨7Ð 2Ð2rcó*—t«}i}|j«D]‹\}}tj|«tj|«} } | |vrŒ5|j | «r#|j | «r|j | «Œi| |vr|| | k7r|j | «Œ‡| || <Œ�|D] } | |vsŒ|| =Œ ~|siifS|j«D� � cic]\} } | dz| dz“Œ}} } |D]%}|j jd|||fz«Œ't|d¬«}i}|«D]^}||vsŒ|D]R}|j|«sŒ|||t|«dz}||vr%|||<|j jd||fz«Œ^Œ`||fScc} } w)a…Finds moved directories and files that should move with them. ctx: the context for one of the sides copy: files copied on the same side (as ctx) fullcopy: files copied on the same side (as ctx), including those that merge.manifestmerge() won't care about addedfilesfn: function returning added files on the other side (compared to ctx) ó/s) discovered dir src: '%s' -> dst: '%s' T)ÚreverseNs' pending file src: '%s' -> dst: '%s' ) r“rrÚdirnameÚhasdirr”rBrPr[Ú startswithrY)r1rârÚfullcopyÚ addedfilesfnÚinvalidrrrÚdsrcÚddstrírrÚdÚdirmove_children_firstrr)Údfs rr;r;*s·€ô‹e€GØ€Gð—N‘NÖ$‰ˆˆSÜ×%Ñ% cÓ*¬H×,<Ñ,<¸SÓ,AˆdˆØ �7‰?à Ø �Z‰Z˜Ô  #§*¡*¨TÔ"2à �K‰K˜Õ Ø �W‰_ ¨¡°$Ò!6à �K‰K˜Õ ð!ˆG�DŠMð%óˆØ �Š<ؘ‘ ðð á Ø�2ˆvˆ à.5¯m©m¬oÔ>©o¡d a¨ˆq�4‰x˜˜T™Ñ!¨o€GÑ>ã ˆØ �‰� ‰ Ø 9¸QÀÈÁ ¸OÑ Kõ ðô$ G°TÔ:Ðà€Ká Ž^ˆØ �HÒ Û+�Ø—<‘< •?à  ™ a¬¨A«¨ kÑ1�BØ ‘~Ø)+˜  A™ØŸ™Ÿ ™ ØGØ  "˜gñ&ôññ,ðð �KÐ Ðùó;?sÃFc󞇇‡—|j«€|j«}‰j«€‰j«Št«}|j«Š|j d‰j«‰j««s)|j j d«t||‰‰«S‰}|‰k7rzt|j««dk(r)|j j d«t||‰‰«S|j|j««|j«}|‰k7rŒzi}t‰‰«}|j«D]\}} | ‰vsŒ | ||<Œˆˆˆfd„} |D� cgc] } | | «sŒ | ‘Œ} } i} | �r¨tjt «}tjt «}‰j#‰j««D]h} t$j&j)| «}t$j&j+| «}||j-| «||j-| «Œj| D]ç} t$j&j)| «}t$j&j+| «}||}||}||z}‰j/| «}|j j1dd«}t|«|kDr3|j j3t5d«| t|«fz«Œ¾|D]%}|j/|«}t7||«sŒ!| | |<Œ'Œét9| «t9|«ifScc} w) a}Fast copytracing using filename heuristics Assumes that moves or renames are of following two types: 1) Inside a directory only (same directory name but different filenames) 2) Move from one directory to another (same filenames but different directory names) Works only when there are no merge commits in the "source branch". Source branch is commits from base up to c2 not including base. If merge is involved it fallbacks to _fullcopytracing(). Can be used by setting the following config: [experimental] copytrace = heuristics In some cases the copy/move candidates found by heuristics can be very large in number and that will make the algorithm slow. The number of possible candidates to check can be limited by using the config `experimental.copytrace.movecandidateslimit` which defaults to 100. rs?switching to full copytracing as base is not an ancestor of c2 r¯s0switching to full copytracing because of merges có$•—|‰vxr |‰vxr|‰vSr,r‚)r)r^r rs €€€rr1z(_heuristicscopytracing..¬sø€�Q˜b�[Ò: Q¨$ YÒ:°1¸°7Ð:rr@scopytrace.movecandidateslimitsBskipping copytracing for '%s', more candidates than the limit: %d )rSrQr“r7r¢rBrPrrYrqr:rVrôrÚ collectionsÚ defaultdictrr8Úosr$ÚbasenamerXršÚfilectxrÚstatusrrr)r1r r r^Ú changedfilesrâr=ÚcprrÚfiltr)Ú missingfilesr<ÚbasenametofilenameÚdirnametofilenamerhrXÚ samebasenameÚ samedirnameÚmovecandidatesÚf2Ú maxcandidatesÚ candidateÚf1rs `` @rrrqsçú€ð2 ‡v�vƒxÐØ �U‰U‹WˆØ ‡v�vƒxÐØ �U‰U‹Wˆä“5€LØ �‰‹€BØ �9‰9�Y §¡£ ¨B¯F©F«HÔ 5à �‰� ‰ ð #ô ô   b¨"¨dÓ3Ð3à €CØ �Š+Ü ˆs�{‰{‹}Ó  Ò "à �G‰G�M‰MÐNÔ OÜ# D¨"¨b°$Ó7Ð 7Ø×јCŸI™I›KÔ(Ø�f‰f‹hˆð �‹+ð€GÜ ˜˜bÓ !€BØ—H‘H–J‰ˆˆSØ �"Š9؈G�CŠLðõ ;€DÙ+Ó7™|˜!©t°A­w’A˜|€LÐ7à€GÚÜ(×4Ñ4´TÓ:ÐÜ'×3Ñ3´DÓ9Ðà—‘˜tŸ}™}›Ö/ˆAÜ—w‘w×'Ñ'¨Ó*ˆHÜ—g‘g—o‘o aÓ(ˆGØ ˜xÑ (× /Ñ /°Ô 2Ø ˜gÑ &× -Ñ -¨aÕ 0ð 0ó ˆAÜ—w‘w×'Ñ'¨Ó*ˆHÜ—g‘g—o‘o aÓ(ˆGØ-¨hÑ7ˆLØ+¨GÑ4ˆKØ)¨KÑ7ˆN𗑘A“ˆBð!ŸG™G×-Ñ-ØÐ!AóˆMô�>Ó" ]Ò2Ø—‘—‘Üð;óðœ#˜nÓ-Ð.ñ /ôðã+� Ø—Z‘Z  Ó*�ܘB Õ#ð*+�G˜IÒ&ñ ,ð3ôB ˜Ó !¤=°Ó#9¸2Ð =Ð=ùò]8s Å2 M ÆM cót—||k(ry|j«|j«}} |j«|j«}}|€ t|«}|€ t|«} |j«|j«}}||kDr t|«}n||kDr t|«}n||k(SŒH#t$rYywxYw)aFreturn True if f1 and f2 filectx have a common ancestor Walk back to common ancestor to see if the two files originate from the same file. Since workingfilectx's rev() is None it messes up the integer comparison logic, hence the pre-step check for None (f1 and f2 can only be workingfilectx's initially). TF)r#ÚlinkrevÚnextÚ StopIteration)rwrtÚg1Úg2Úf1rÚf2rs rrrÞs³€ð ˆR‚xØà �\‰\‹^˜RŸ\™\›^ˆ€BðØ—:‘:“< §¡£ˆSˆà ˆ;Ü�b“ˆBØ ˆ;Ü�b“ˆBàØ—z‘z“| R§Z¡Z£\�ˆCØ�SŠyܘ"“X‘Ø�s’ܘ"“X‘à˜R‘x�ðøô òÙðús¨BB+Â*B+Â+ B7Â6B7có—t||«}|j«}t|||«t|j ««D] \}}||vsŒ ||=Œ|j «D]\}}||j |«Œy)a reproduce copies between base and ctx in the wctx Unlike mergecopies(), this function will only consider copies between base and ctx; it will ignore copies between base and wctx. Also unlike mergecopies(), this function will apply copies to the working copy (instead of just returning information about the copies). That makes it cheaper (especially in the common case of base==ctx.p1()) and useful also when experimental.copytrace=off. merge.update() will have already marked most copies, but it will only mark copies if it thinks the source files are related (see merge._related()). It will also not mark copies if the file wasn't modified on the local side. This function adds the copies that were "missed" by merge.update(). N)rrQrrrÚ markcopied) Úwctxrâr^Ú new_copiesr½rÂÚ__rrs rÚ graftcopiesr…ÿs€ô ˜D #Ó&€JØ �W‰W‹Y€FÜ ˆF�D˜*Ô%ô ˜×)Ñ)Ó+Ö,‰ˆˆbØ �6Š>ؘ4Ñ ð-ð×$Ñ$Ö&‰ˆˆSØ ˆS‰ ×јSÕ!ñ'rr,)NN)4rergÚi18nrrrÚrrTrrr Úutilsr Ú revlogutilsr r rkÚ importrustrwrr!r*r4r=rFrgryrƒrMr™rÔrÊrÒrµrÉržrŸrìrôrør÷rr rrrrr;rrr…r‚rrÚr‹sùðóÛ åÝ÷óõ÷ð ˆ&× Ñ ˜NÓ +€òòBò ó  ó*ò'ò@òF#òLò$i òXnðd€ Ø € Ø€ òò>7 òt$òNCòL$ó, ò .ò  ó +ò\C4òLò(÷*! ñ! òHI3òXD òNj>òZóB"r