\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@s.ddlmZddlZddlZddlZddlZddlmZddlm Z m Z ddl m Z m Z mZmZmZmZmZmZmZmZmZmZddlmZmZdZd Zd ZiZiZej Z!e!j"Z"e!j#Z#e!j$Z$ed Z%ed Z&d e'fdYZ(dZ)dZ*dZ+dZ,dZ-dZ.e!de"ddZ0e!de"ddZ1e!de"ddZ2e!de"ddZ3dZ4ddZ5dZ6d Z7e!d!e$ed"d#e6dd$Z8e!d%e$ed"d#e6dd&Z9e!d'e$ed"d#e6dd(Z:ddd)Z;e!d*e#d#e6d+Z<e!d,e#d#e6d-Z=e!d.e#ed/dd0Z>e!d1e$d2e?d3e?dd4Z@e!d5e#d2e?d3e?dd6ZAdd7ZBdd8ZCd9ZDddgZEdd:ZFd;ZGd<ZHd=ZIejJd>ZKdd?ZLd@ZMdAZNdBZOdCZPdDZQddEZRddFZSdGZTeTdde!ejUZVdS(Hi(tabsolute_importNi(t_(tnullidtshort( tencodingterrort formattertmatchtpycompatt registrartscmutilt simplemergettagmerget templatekwt templatertutil(tprocutilt stringutilcG@s|jd|d||S(Ns merge-toolst.(tconfig(tuittooltparttargs((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_toolstr&scG@s|jd|d||S(Ns merge-toolsR(t configbool(RRRR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _toolbool)scC@s|jd|d|S(Ns merge-toolsR(t configlist(RRR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _toollist,ssfile '%(fd)s' was deleted in other%(o)s but was modified in local%(l)s. What do you want to do? use (c)hanged version, (d)elete, or leave (u)nresolved?$$ &Changed $$ &Delete $$ &Unresolvedsfile '%(fd)s' was deleted in local%(l)s but was modified in other%(o)s. What do you want to do? use (c)hanged version, leave (d)eleted, or leave (u)nresolved?$$ &Changed $$ &Deleted $$ &Unresolvedt absentfilectxcB@sneZdZdZdZdZdZdZeZ dZ dZ dZ d Z d ZRS( sRepresents a file that's ostensibly in a context but is actually not present in it. This is here because it's very specific to the filemerge code for now -- other code is likely going to break with the values this returns.cC@s||_||_dS(N(t_ctxt_f(tselftctxtf((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt__init__Ms cC@s|jS(N(R(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytpathQscC@sdS(N(tNone(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytsizeTscC@sdS(N(R%(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytdataWscC@stS(N(R(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytfilenodeZscC@s;|jo9|j|jko9|j|jk S(sVcompare with other file context returns True if different from fctx. (tisabsentR!R$(R tfctx((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytcmp^s cC@sdS(Nt((R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytflagsgscC@s|jS(N(R(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt changectxjscC@stS(N(tFalse(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytisbinarymscC@stS(N(tTrue(R ((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR)ps(t__name__t __module__t__doc__R#R$R&R'R(R1t _customcmpR+R-R.R0R)(((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRGs        cC@sE|tkr|St||d|}|jdr8|St||S(Nt executablespython:(t internalsRt startswithtfindexternaltool(RRtcmd((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _findtoolss  cC@s |jdr|Stj|S(Nspython:(R8Rt shellquote(R:((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_quotetoolpath{scC@sxdD]w}t|||}|s+qntj|t||d}|rtj|t||dd}|r~|SqqWt||d|}tjtj|S(Ntregkeyt regkeyalttregnamet regappendR,R6(R>R?(RRt lookupregRtfindexet expandpath(RRtkntktptexe((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyR9s " c@sjddtfddfd}jdd}|rt|}|r| rdS|r|t|fS||fSntjjd } | r|r|  rdS| | fSn|o} xj d D]\} } t j |j d | g} | |r|| | || |r|r| d d t  rj tdtj| tj|fnt| }| t|fSqWi}t}x}j dD]l\}}|jdd}||kr#tt|d||DsRTs"running merge tool %s for file %s t slaunching merge tool: %s tcwdRat blockedtagt mergetools%launching python merge script: %s:%s i(t extensionss hgmerge.%ss&loading python merge script failed: %ss%s does not have function: %s(thookRIsmerge tool returned: %d ($R)RRURR$R/R%RRt_maketempfilestwvfsRRnRR.tnodeR-Rt interpolateRRRtsystemRcR,Rtloadpatht ExceptionRtAborttgetattrRt shellsplitRt pythonhookR1(&RoRRRRRRRRRRqRSRRRRRRRt temppathstbasepatht otherpathtlocaloutputpathtoutpathtmylabelt otherlabelt baselabeltenvRR|R:RRtmodtmergefntargslistRtrettraised((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_xmerges !              cC@s|jdkr!|j}ni|d6}|j|}d|j|d}d||f}|r}|jd}ntj|d S( sApplies the given template to the ctx, prefixed by the label. Pad is the minimum width of the label prefix, so that multiple markers can have aligned templated parts. R!s%s:is%s %siiPiNiH(RR%tp1t renderdefaulttljustt splitlinesRtellipsis(R!ttemplateRtpadtpropsttemplateresulttmark((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt_formatconflictmarkerfs cC@s&|j}|j}|j}|j} | jdd} |d k rct| |d| } ntj| } tj| |} tj | | dt j d| } t d|D} t || |d| t || |d| g}t|dkr"|jt || |d| n|S( sjFormats the given labels using the conflict marker template. Returns a list of formatted labels. Rtmergemarkertemplatetdefaultst resourcescs@s|]}t|VqdS(N(Rn(t.0R((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pys siiiN(R.RRR%RRt unquotestringRttemplateresourcest maketemplaterR tkeywordstmaxRRnRm(RoRRRRRtcdtcotcaRR ttresttmplR t newlabels((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _formatlabels}s"      #cC@s@|dkridd6dd6Sid|dd6d|dd6S(sReturn a dictionary of extra labels for use in prompts to the user Intended use is in strings of the form "(l)ocal%(l)s". R,Rtos [%s]iiN(R%(R((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRs cC@s |j|j|jdS(N(RR'R-(RR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRsc C@s-|jrdSddlm}t||}tj|||}|j|jj ol|j|j j  }t ||j r|r|t |jj d} |r|| j|j|jn|| S|rt ||j rtj||jqtj||n|j|d|SdS(sMakes and returns a filectx-like object for ``fcd``'s backup file. In addition to preserving the user's pre-existing modifications to `fcd` (if any), the backup is used to undo certain premerges, confirm whether a merge changed anything, and determine what line endings the new file should have. Backups only need to be written once (right before the premerge) since their content doesn't change afterwards. i(RRoN(R)R%R,RRR torigpathR8RRtvfsRRRnRR'R-RR}tcopyfiletarbitraryfilectx( RoRtwctxRRRRRt inworkingdirtrelpath((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _makebackups" #c #@s^d jjdd}|r6tjd|nfdfd}|d|}|d|}|} |r| jdrtjj| \} } nd | \} } t |d } | j | j Wd QX| j nz||| fVWd r#t jn6tj|tj|| rY|rYtj| nXd S( sWrites out `fco` and `fca` as temporary files, and (if uselocalpath) copies `localpath` to another temporary file, so an external merge tool may use them. t experimentaltmergetempdirprefixtprefixc@stjj|\}}dtjj||f}rttjj|}|rb||7}nt|d}n4tjd|dd|\}}tj|d}||fS(Ns%s~%stwbR-Rtsuffix( tosR$tsplitexttbasenameRtopenRtmkstemptfdopen(R-R$tfullbasetexttpretnameR"R(ttmproot(s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pytmaketempfrompaths "c@sT||j\}}j|j|j}|j||j|S(N(R$t wwritedataR'Rtclose(R-R!R"R9R'(R;Ro(s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyttempfromcontexts   RRs.origRtrbN(R%RRRtmkdtemptendswithR0R$R1R3RtreadR=tshutiltrmtreeRtunlink( RoRRRt uselocalpatht tmprootprefixR>tbtctdRR"tsrc((R;RoR:s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRs0     c # C@s|j|stdtfS|j} |j} |jpR|jpR|j} d|j|jk} |jp|j} t || | | | | \}}d}|t kr|j dr|t d}n|r|j drt}|j ddkr]|djdd\}}|s9t}nd |ksQd |krct}qcnt}|rtjtd |n|}n| jd || tj| tj| tj| f|t krt |}|j}|j}|j}t}n9|jrt}nt}t}td }d}t}||| | |f}|tkr|||||||||\}}t||fS|r||jkr| jtd||j| fq| jtd| n| jd|||f|rp|||||||| rp|rc|jrOtjdn| j|| ntdtfSt || |||}ddd|f}d}z| j!dd}|rt"| |d}n|}|st#}n|}|dkrt$|||||d|}n|r|tkr|} d}!|dkrK|}!n|dksc|dkrt$||||| d|!} nt%||||||d| }| |tfS|||||||||d|\}"}}|"rt&||| |||}n|rR|rE|jr1tjdn| j|| nt'| nt||fSWd| r|dk r|j(nXdS(sperform a 3-way merge in the working directory premerge = whether this is a premerge mynode = parent node before merge orig = original local filename before merge fco = other file context fca = ancestor file context fcd = local file context for current/destination file Returns whether the merge is complete, the return value of the merge, and a boolean indicating whether the file was deleted from disk.Rs internal:tinternalspython:t:iiis\t/sinvalid 'python:' syntax: %ss?picked tool '%s' for %s (binary %s symlink %s changedelete %s) smerging %s failed! smerging %s and %s to %s s merging %s smy %s other %s ancestor %s s0in-memory merge does not support merge conflictsRt mergemarkerstbasicRRN()R+R1R%R/RR$R0R-R)RyR7R8RntcounttrsplitRRRRRRdROt onfailureRRRRt fullmergeRPRRRUR*RRRR!Rt_checkt_onfilemergefailureR(#RRoR'RRRRRRRRRSRRRXRRqRt invalidsyntaxtscripttfuncRORSRt isexternalRRRRRtinternalmarkerstylet markerstyletformattedlabelstpremergelabelst labeltoolt needcheck((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _filemerges    $!              ' )           cC@std}tj|dS(Ns0merge halted after failed merge (see hg resolve)(RRtInterventionRequired(tmsg((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt _haltmerges cC@si|jdd}|dkrOtd}|j|ddkrOtqOn|dkretndS(NRIs on-failureRs,continue merge operation (yn)?$$ &Yes $$ &Noiithalt(RRRRd(RtactionRc((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRVs    cC@sttjd|tjS(Ns!^(<<<<<<< .*|=======|>>>>>>> .*)$(tbooltretsearcht MULTILINE(R'((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pythasconflictmarkerssc C@ss|j}|\}}}}| rmt||dsOdt||dkrmt|jrmd}qmnt} dt||dkrt} |jtd|drd}qn| r8| r8t||dsdt||dkr8|dk r8|j | r8|jtd |dr5d}q5q8n|dk rot||d rot t |||n|S( Ntcheckconflictst conflictsR[iRs0was merge of '%s' successful (yn)?$$ &Yes $$ &Not checkchangedtchangedsJ output file %s appears unchanged was merge successful (yn)?$$ &Yes $$ &Notfixeol( R$RRRkR'R/R1RRR%R+RR( RoRRRRRRRRtchecked((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRUs,      cC@s|j|jS(N(twjoinR$(RoR!((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRsc C@s%tt|||||||d|S(NR(RaR1(RoR'RRRRRR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyRsc C@s%tt|||||||d|S(NR(RaR/(RoR'RRRRRR((s9/usr/lib64/python2.7/site-packages/mercurial/filemerge.pyt filemergesc C@sx|jjD]\}}d|}|t|<|td|<|t|s    R         ,   k ,    $           K      *9