^clXddlZddlZddlmZddlmZddlmZm Z m Z m Z ddl m Z ddlmZmZe jdZd Zd Zd Zd(d Zd(d ZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&d)dZ'dZ(dZ)d(dZ*dZ+dZ,d Z-Gd!d"Z.d#Z/d$Z0d%Z1d&Z2d'Z3dS)*N)_)nullrev)matchpathutilpolicyutil) stringutil)flagutilsidedata copy_tracingct|D]\}}||kr||=||vr||=||vr||=dS)z)filters out invalid copies after chainingN)listitems)srcdsttkvs 2/usr/lib/python3/dist-packages/mercurial/copies.py_filterr"sd,QWWYY1 66! c\\! c\\!c|}|D]\}}|||||<|S)z.chain two sets of copies 'prefix' and 'suffix')copyrget)prefixsuffixresultkeyvalues r_chainr!CsH [[]]Fllnn// Ujj..s Mrc |D]x}|}||d|kr|cS|r0||d|kr|cSydS)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) ancestorspathrfilenode)fctxambasemffr$s r _tracefiler*Ks^^  vvxx 66$   - -KKK  fjjt,, <<KKK rc|j}|}t|D],}||jr |r||s||=-|SN)dirstatecopiesrr get_entrytracked)repordscrs r_dirstatecopiesr4[so B A !WW||A& 5 q ! Hrc|}|}|||S)zComputes 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)abrmambs r_computeforwardmissingr=ds4 B B ==5= ) ))rc^|jdkrdS|jdd}d}||vS)z9Checks if we should use changeset-centric copy algorithmschangeset-sidedataT experimentalscopies.read-from)schangeset-onlys compatibility)filecopiesmodeuiconfig)r1readfromchangesetsources rusechangesetcentricalgorFns< 333tw~~o/BCCH;O  &&rc|j}t|rt|||S|jjo|jdd}|jj}|r|d||fz|}|dn|}i} |} ||krj| tkr;tj |} tj|| } |jddr@t!||} |r|dt%| zn/t'||| } |r|dt%| z|jj| gd } t-| D]}|r|d |z||}| |_|rt1j}t5|||}|r|r|d |z|| |<|r"|d t1j|z z| 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 configbooldebugr7p1p2revrmatchmodexactfilesintersectmatchersrwalklenr= changelogr#sorted_ancestrycontextr timerr*)r9r:baserr1rPdbgr'r(cmforwardmissingmatch filesmatchermissingancestrycontextr)r&startopaths r_committedforwardcopiesrgws 7Dt$$4&q!U333 G  O$'"4"4X"O"OE '-C N  Cq!f LMMM B\TTt}}F B ttvv{{qttvvzz||w..~aggii00 &8 MM w($CDD qvve}}%%  P C?#g,,N O O O(A5HIII   CCg,,    g'1115577)t1LLO G__  @ C:Q> ? ? ?t /  !JLLE4V,,   G=EFFFBqE   C<:<<%')    Irc|j}|j|jtj|jt fd}nfd}|S)zreturns 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 Nc|\}}|zr.|jtj}nd}|||fSr,) _sidedatar sidedatamodSD_FILES)rSrQrRraw HASCOPIESINFOchangelogrevisionflagsparentss rrevinfoz _revinfo_getter..revinfos`WS\\FBuSzzM) '',,6::;;OPPC= rcl|\}}|zr|j}nd}|||fSr,)changes)rSrQrRrtrnrorprqs rrrz _revinfo_getter..revinfosPWS\\FBuSzzM) ++C008G$ $r)rZ parentrevsrpr REVIDX_HASCOPIESINFOrorustmod)r1rclrrrnrorprqs @@@@r_revinfo_getterrys BmG HE1M, ! ! ! ! ! ! ! ! ! % % % % % % % % Nrcifd}|S)z&return a cached version of is_ancestorc||krdS||krdS||f}|}|||x}|<|S)NFT)r)ancdescrretcache is_ancestors r _is_ancestorz(cached_is_ancestor.._is_ancestors[ ::5 D[[4Dkiinn ;*{355 5C%* r)rrrs` @rcached_is_ancestorrs/ E       rc J|t|fvriS|}|j}|j}|j}ttf}||gd}||g|g} t} d} |j dd} | D]c} || }||krd} |\}}|tkr||vr| ||tkr||vr| |d| siS| rit| } t| }|g}|||| dtfd| D} |jd krt#d | D}| D]?} || D]'}|tkrd || <||vr||xxd z cc<(@t'||}|j5t+| |||||| cdddS#1swxYwYdSt#d | D}| D]J} || D]2}|tkrg|| <||vr||| 3K| }||ksJ| | | t5|}t7| |||||S)NTrJ)commonheadsFrHscopy-tracing.multi-thread) includepathcg|]}|v| Srr).0r roots_to_heads r z+_changesetforwardcopies..)s#666a1 #5#5#5#5#5rr?c3K|]}|dfV dS)rNrrrs r z*_changesetforwardcopies..5s&44q!f444444rrrc3K|]}|gfV dSr,rrs rrz*_changesetforwardcopies..Ks&//AB//////r)rSrr1 unfilteredrZ isancestorrev_uncheckedparentrevsr#findmissingrevssetrBrOaddrminreachablerootsrAdictruryreading_combine_changeset_copiesappendpopextendsort_revinfo_getter_extra_combine_changeset_copies_extra)r9r:rr1rx isancestorrq graph_rootsr#revsrootshas_graph_roots multi_threadrpsrQrRmhchildren_countprrchildrenxrs @rrMrMsuuww7AEEGG$$$ 6688   D B!J%GG$K aeeggY$ 77I  aeeggYquuwwi  @ @D EEEO7%%h0LMML   WQZZ   "OOFBW}}y " W}}y "  7U  JJ UUWWI))!Q4)HH M** 66664666 33344e44444 + +A]]1%% + +<<$%q!&&"1%%%*%%%  + "$.. ^ # # % %  ,                  /////// * *A]]1%% * *<<  ==QK&&q)))  * HHJJAEEGG|||| E '--. (AEEGGWeZ   s2'J&&J*-J*c |}t-tt|||||}nt |}i} |D]~} || \} } } d}d| fd| ffD][\}}|t kr||}|*|dz}|||<|r| |d}n| |d}|ix}}n|r|}n|}| i}|dkr| j }n |dkr| j }|rb|}| D]3\}}||}||d|d}| |f||<4||usJ| j r-| j D]%}||vr||ur|}| df||<&||}@|dksJt|||| | }]|| | <i}| |}|J| D]\}\}}||||<|s2t|D]}||s||=|S)acombine 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)alwaysrwcombine_changeset_copiesrrrrrrcopied_from_p1copied_from_p2rremoved_merge_copies_dictkeys)rr targetrevrrrrr alwaysmatch final_copies all_copies current_revrQrRrtcurrent_copiesparent parent_revremaining_childrenr. newcopies childcopiesdestsourceprevr)targetrev_itemsttfilenames rrr^s(,,..K77 JJ 7L  ( 33  F 5F 5K%gk22OBG!N)*2wB&8@ @ " ((%3%7%7 %C%C"%-"a'"-?z*%>'^^J==FF'^^J==F>)++I'' & II &I&"$K{{&-&< 1&-&< "7$*KKMM ,7,=,=,?,?DDLD&#)::f#5#5D#/DG4G)-a/:F.CIdOO(6666C!(CCA I~~#,#6#617 I0;T/B ! ")%.NN"Q;;;;%7!&"# &&NN'5J{ # # $Y/***"1"7"7"9"9 , , D,2v!%+ T" +\..0011 + +H5?? + * rrc|D]q\}}||}||||<"t|||||\}} | r'|tkr||df||<S||df||<a|tkr|||<r|S)amerge 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) Nr)rr_compare_values PICK_MAJOR) minormajorrrt current_mergerr otherpick overwrites rrrs{{}}$$ e $ =E$KK-T5%OD) $:%%#0%(";E$KK#0%(";E$KK###d Lrc|\}}|\}}||kr||ksJtdfS|||||jvr tdfS|||||jvr tdfS|||r|||jvr tdfStdfS|||r|||jvr tdfStdfS| tdfS| tdfStdfS)zcompare 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. FNT) PICK_EITHERsalvaged PICK_MINORrmerged) rtrrrrmajor_tt major_valueminor_tt minor_values rrrsD"Hk!Hk8k))))E!!  #   G$ $ $4  #   G$ $ $4 Hh ' '  47>#9#9t# #u$ $ Hh ' '  47>#9#9t# #u$ $  4  44rc@j}|jfdfd}|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|vrdS|}|j|j}d}|D]}|jkr|dz }|dkS)NFrrr)rV_filelogrq _filenodenullid)r$r&rq nb_parentsnctxr1s rismergedz=_revinfo_getter_extra..get_ismerged..ismerged>sp399;;&&ut9Dm++DN;;GJ $ $ ##!OJ? "rr)rSrrr1s @r get_ismergedz+_revinfo_getter_extra..get_ismerged;s23i # # # # # #rc|\}} |}|j\}}|}||||||fSr,)_copies filesremoved) rSrQrRrp1copiesp2copiesrrrqr1s rrrz&_revinfo_getter_extra..revinfoKsWB3i [(""$$2x7LL4E4EEEr)rZru)r1rxrrrrqs` @@rrr.s_ BmG FFFFFFF NrcVi}}|D]a}||d} | i} t||D]-\} } || \} } }}}}|| krd}|}n || ksJd}|}|s fd|D}| }|rb| }|D]3\}}| |}||d|d}| |f||<4|| usJ|D]%}||vr|| ur| }| df||<&|| }|||| <|dkrt ||||t ||||||| </ci}||D]\}\}}||||<|S)zyversion of `_combine_changeset_copies` that works with the Google specific "extra" based storage for copy informationNrrc2i|]\}}|||Srr)rrrrs r z3_combine_changeset_copies_extra..ks<!)cEE#JJr)rr enumeraterrr_merge_copies_dict_extra)rrrrrrrrrrr.ir3rQrRrrrrrrrrrrr) othercopiesrrs ` rrrUsm J,,..K 6.6.4(( >Fhqk**1 .1 .DAq->-@-@ I /"KKMM $/$5$5$7$722LD&!::f--D'DG,?!%a'(&kIdOO .... - - >> F**%+KKMM $%t9IaL$..++K" ) 1 Q;;,#Y H-!; H%.JqMMc1 .fL(399;;((lr6  !'L  rc|D]g\}}||}||||<"|d}|d}|d|dkrE||ks|||r ||r|||<hdS)zrversion of `_merge_copies_dict` that works with the Google specific "extra" based storage for copy informationNrr)rr) rrrrrr rnew_ttother_tts rrrs{{}}$$ e $ =E$KK1XFQxHQx58##(""!z&(33#8D>>#$d !$$rc8||}||}|Ht||||}t |t |j|}nt||||}|S)zgiven copies to context 'dst', finds renames from that context)r[r)r.rrrrrs rrrsb Av||~~&&1  q   88 ! Hrc<|j}|jjo|jdd}|r|jd||fz||ks|r|siS|D||kr,|r|jdt||S||}||kr0|r|jdt|||}n ||kr/|r|jdt|||}n|r|jd d}|tkr|}t||}t||||} t|t| z} | D]4} | | | | kr|| =| | =5t|||} 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 )rLrBrNrOrPrSrQr4ancestorrrrrrrr!r) ryrr1rPr9r.r^x_copiesy_copies same_keysrx_backward_renamess r pathcopiesrs5 7D G  O$'"4"4X"O"OE    =A F    AvvQvav uuww1;;  D GMMB C C CtU+++ 1 AAvv  C GMMA B B B1E222 a  D GMMB C C C!!Qe444  D GMMB C C C 5577g  D!!Q''!!QE:::MMCMM1   A||A(,,q//11QKQK-h5AA     Aq& Mrc|r|r||krttifS|}|[||jkr,tt ||tifS|jdd}tj |durttifSt|rt||||S|dkr5t|||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. Nr@rFs heuristics) branch_copiesr1rnoder-rQr4rBrCr parseboolrF_fullcopytracing_isfullcopytraceable_heuristicscopytracing)r1c1c2r^r copytracings r mergecopiesr sjB 4R4288 33''))''))K wwyyRWWYY$-*:*:*<*<<< /$ << = = OO   '..,??KK((E11 33t$$4b"d333 m## b$ / / 8#D"b$77 7%dBD999b"d333rcx||}|r}|ri|jdd}t |d||}||kSdS)aChecks 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. Nr@scopytrace.sourcecommitlimit%d::%dF)rSrQmutablerB configintrYr)r1r r^sourcecommitlimitcommitss rr r Qs vvxx UUWW zz||+ + G-- ;  dii 488::rvvxx@@AA*** 5rc (||vr ||vr|||<dSdS||vrdS||||krt||||sdS||||ks,||||kr |D] } ||| <dSdSr,)_relatedrp) rdsts1m1m2r<r r^r renamedeleters r_checksinglesidecopiesres "}} b== %L    = B  CBsG  HRWd3i$@$@  CBsG  rxx}} ==  CDII >=  rc"eZdZdZ ddZdZdS)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^|in||_|in||_|in||_|in||_dSr,rrdirmove movewithdir)selfrrr r!s r__init__zbranch_copies.__init__sJ,BBD "."6BBL$_rr' !,!422+rc Hd|jd|jd|jd|jd S)Nzr)r"s r__repr__zbranch_copies.__repr__s8 III     LLL       r)NNNN)__name__ __module__ __qualname____doc__r#r%rrrrrzsL&GKFFFF     rrc  $%&'(|&|'|(t||}t||}|s|sttifSi}i}|D].\}} || g|/|D].\}} || g|/i} i} i} i} i}t |t |z}|D]} || }|| }|r|r| &vrP| 'vrLt |}t |}||zr||zD] }| | |<| | |< nt||z| | <| &vr4| 'vr0t |}t |}||zD] }| | |<| | |< |rt| |&'(||| | |rt| |'&(||| | g%%&'(fd$$fd}$fd}j j r|}|}d}|r5j d|dzd |fz|r5j d|dzd |fzt }t }| D]}||| D]}|||D]}||j d d|fd |ffD]~\}}|sj d |zt|D]I}d }|| vs|| vr|d z }||vr|dz }||vr|dz }j d||||fzJ~~j dt!|| ||\}}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.s } }t||z }t||z }||f|Sr,)r8rr[r) idx addedinm1 addedinm2u1u2rrrr<r1s r_get_addedfilesz)_fullcopytracing.._get_addedfiless # b$*:*:*<*<==I b$*:*:*<*<==I I-..B I-..B LL"b " " "SzrcdS)Nrrr1srz"_fullcopytracing..??1%%rcdS)Nrrr3srr4z"_fullcopytracing..r5rs 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 setdefaultrrrr[rrBrNrPjoinvaluesupdate _dir_renames))r1r r r^copies1copies2inversecopies1inversecopies2rrcopy1copy2diverge renamedelete1 renamedelete2 allsourcesrdsts2u1fnu2fnr/r0headerrenamedeleteset divergesetdstssider.r)notedirmove1 movewithdir2dirmove2 movewithdir1branch_copies1branch_copies2r1rrrr<s)` @@@@@rr r s B B Br""Gr""G 4w4 33NNMMOO77S!!#r**11#6666MMOO77S!!#r**11#6666 E EGMM^$$s>':'::J%%""3''""3'' " U" "}}BE E  5=9$u}))%(c %(c )$*%%-#8#8GCLLsbyyE E  5=%%C!$E#J!$E#JJ  "UBBD%      "UBBD%    E & % % %D % % % %D w+ TVV TVV+   GMM6H#4hmmB6G6G"HH      GMM6H#4hmmB6G6G"HH   %%UU NN$$ $ $D   d # # # #!((** ) )D  " "4 ( ( ( (!((** ) )D  " "4 ( ( ( (   +   '09g2FG  LD&  GMM-4 5 5 5F^^  ::eDLD ??DLD''DLD 6&)Q9MM   GMM7888)$E7DIIHl)$E7DIIHl"5-<PPN"5-<PPN >7 22rcTt}i}|D]\}}tj|tj|} } | |vr2|| r+|| r|| r| |vr"|| | kr|| | || <|D] } | |vr|| = ~|siifSd|D}|D]'} |jd| || fz(t|d} i}|D]j}||vrd| D]a} | | rJ|| |t| dz}||vr$|||<|jd||fznbk||fS)aFinds 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) c&i|]\}}|dz|dzS)/r)rrrs rrz _dir_renames..Qs&>>>daq4xT>>>rs) discovered dir src: '%s' -> dst: '%s' T)reverseNs' pending file src: '%s' -> dst: '%s' ) rrrdirnamehasdirrrBrPr[ startswithrY)r1rrfullcopy addedfilesfninvalidr rrdsrcddstrddirmove_children_firstr!r)dfs rr>r>*s&eeGGNN$$ ! !S%c**H,>gmmoo>>>G     9Q O K    $GT:::K \^^   H  +  <<??  aAk1B~~)+ A G "g&E  K rcx||}t}||ds,|jdt||S}|krt| dkr,|jdt||S| | |}|ki}t}| D]\}} | vr| ||<fdfd|D} i} | rtjt } tjt } D]v}t$j|}t$j|}| ||| ||w| D]}t$j|}t$j|}| |}| |}||z}|}|jdd }t||kr:|jt5d |t|fz|D],}||}t7||r|| |<-t9| t9|ifS) 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. Nrs?switching to full copytracing as base is not an ancestor of c2 rs0switching to full copytracing because of merges c|vo|vo|vSr,r)r)r^r rs rr4z(_heuristicscopytracing..sQb[:Q$Y:17rc*g|]}| |Srr)rr)filts rrz*_heuristicscopytracing..s&777!ttAww7A777rr@scopytrace.movecandidateslimitsBskipping copytracing for '%s', more candidates than the limit: %d )rSrQrr7rrBrPr rYrqr=rVrr collections defaultdictrr8osr$basenamer\rfilectxrstatusrrr)r1r r r^ changedfilesrr@cprr missingfilesr?basenametofilenamedirnametofilenamer)rnr\ samebasename samedirnamemovecandidatesf2 maxcandidates candidatef1rjrs `` @@rr r qs2 vvxx UUWW vvxx UUWW55L B 99Y BFFHH 5 54   #    b"d333 C ++ s{{}}   " " GMMN O O O#D"b$77 7CIIKK(((ffhh ++G b ! !BHHJJS "99GCL ; : : : : :D7777|777LG)+(4T::'3D99t}}// 1 1Aw''**Hgooa((G x ( / / 2 2 2 g & - -a 0 0 0 0 + +Aw''**Hgooa((G-h7L+G4K)K7NAB!G--!AM>""]22;#n--. /+ + + ZZ **B##+*+GI&  +  ! !=#9#92 ==rc||krdS||}} ||}}|t|}|t|} ||}}||krt|}n||krt|}n||kS[#t$rYdSwxYw)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). TNF)r#linkrevnext StopIteration)r|ryg1g2f1rf2rs rrrs Rxxt \\^^R\\^^B::<<S ;bB ;bB zz||RZZ\\CSyy"XXs"XXRx  uusB$CC C&%C&c6t||}|}t|||t|D] \}}||vr||= |D] \}}|||!dS)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) wctxrr^ new_copiesrr__rrs r graftcopiesrs D#&&J WWYYF FD*%%% ))++,,!!b 6>>4 $$&&""S S S!!!!""rr,)NN)4rkrmi18nrrrrrTrrr utilsr revlogutilsr r rk importrustrwrr!r*r4r=rFrgryrrMrrrrrrrrrrrrrrr rrr r>r rrrrrrs  & N + +B        ****'''@@@F###L$i i i Xnnnd   >7 7 7 t$$$NCCCL$$$,     . . .    ++++\C4C4C4L(*! ! ! ! ! ! ! ! HI3I3I3XD D D Nj>j>j>ZB"""""r