ó ŸçƒQc@svddlZddlZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd „Z d „Z d „Z dS( iÿÿÿÿNcCs5tg|D]$}||kr ||kr |^q ƒS(s-Return list of elements in d1 not in d2 or d3(tsorted(td1td2td3td((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyt _nonoverlap scCs'|jdƒ}|dkrdS|| S(Nt/iÿÿÿÿt(trfind(tfts((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyt_dirnames c Csº|j}t|ƒ}|dkr*|}n|dkr?|}nid|6d|6}| | g}tj|ƒt|ƒ}t}|} x#|r«tj|ƒ } | |krÙg|jjƒD]} |j | ƒ^q»} n|j | ƒ} x | D]˜} | dkrqïn| |krL|| || <|| r8|d7}ntj || ƒqï|| rï|| || krïd|| <|d8}t }qïqïW|| r‰| } |d8}q‰q‰W|s¶dS| S(soFind the earliest revision that's an ancestor of a or b but not both, None if no such revision exists. iÿÿÿÿiiN( t changelogtlentNonetheapqtheapifytFalsetheappoptdirstatetparentstrevt parentrevstheappushtTrue( trepotatbtcltworkingtsidetvisitt interestingthascommonancestortlimittrtpR((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyt _findlimitsF          .         cCsË|jƒ}xy|jƒD]k\}}||krk|||krR||||b(tcopyt iteritemstitems(tsrctdstRRtttktv((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyt_chainNs     cCsq|jƒ}|jƒ}xR|jƒD]D}|j|jƒdƒ|jƒkrS|S|jƒ|kr%dSq%WdS(s@return file context that is the ancestor of fctx present in actxN(Rtmanifestt ancestorstgettpathRtfilenode(tfctxtactxtstoptamR ((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyt _tracefilees  $cCsS|jj}|jƒjƒ}x.|jƒD] }||dkr+||=q+q+W|S(Ntanm(t_repoRtcopiesR&tkeys(RtdstcR,((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyt_dirstatecopiesps  cCsåd}|jƒdkrC|}|jƒ}||krCt|ƒSni}t|jƒjƒƒ}|j|jƒjƒƒx:|D]2}t|||ƒ}|r|j ƒ|| 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. "diverge" is a mapping of source name -> list of destination names for divergent renames. "renamedelete" is a mapping of source name -> list of destination names for files deleted in c1 that were renamed in c2 or vice-versa. csQt|ƒdkr>ˆjƒdkr1ˆj|ƒSˆj|ƒSˆj|d|ƒS(Nitfileid(R RRtfilectx(R tn(tc1tc2R(s4/sys/lib/python2.7/site-packages/mercurial/copies.pytmakectxÔs   cSs)||kr|S|jƒ|jƒ}}yç|jƒ|jƒ}}|dkr`|jƒ}n|dkr{|jƒ}nx‘tr|jƒ|jƒ}}||kr¸|jƒ}q~||krÓ|jƒ}q~||krã|S||ks||ks||kr~tSq~WWntk r$tSXdS(N(R0RRtnextRRt StopIteration(tf1tf2R"tg1tg2tf1rtf2r((s4/sys/lib/python2.7/site-packages/mercurial/copies.pytrelatedás*       $  c sHd}t|gƒ}xˆ|||ƒjƒD]é}|jƒ}|jƒ}||kro|ˆkr/Pq/q/n|j|ƒ|ˆ|<||kr˜q/n||ˆj|ƒkrµPnˆ|||ƒ}ˆ||ˆjƒƒ}|r/||ks||jƒkr/|ˆ| dst: '%s' %s s! checking for directory renames Rs) discovered dir src: '%s' -> dst: '%s' s' pending file src: '%s' -> dst: '%s' N(tnodeRRR@R;R%RR/tutilt lrucachefunctuitdebugRtjoinRAR(R tupdateRtdirstaddpathR'R R]t startswith(RRQRRRgR`RaRSt movewithdirRltu1tu2R t renamedeletet renamedelete2tdiverge2RbtfltnoteRRtinvalidtdirmoveR*R)tdsrctddsttiRtdf(( RQRRRgR&RhRiRjR"RkR\Rs4/sys/lib/python2.7/site-packages/mercurial/copies.pyt mergecopies®sº-     $      *5                    ( RqRRR R%R.R8R?RHRIRMRˆ(((s4/sys/lib/python2.7/site-packages/mercurial/copies.pyts     9