\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@s|ddlmZddlZddlZddlZddlZddlmZddlm Z m Z m Z m Z m Z mZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&e#j'Z'de(fd YZ)d e)fd YZ*d e(fd YZ+de+fdYZ,de)fdYZ-de-fdYZ.de+fdYZ/de/fdYZ0de-fdYZ1de/fdYZ2de.fdYZ3dZ4dZ5d Z6d!e-fd"YZ7d#e/fd$YZ8d%e-fd&YZ9d'e(fd(YZ:dS()i(tabsolute_importNi(t_(t addednodeidthextmodifiednodeidtnullidtnullrevtshorttwdirfilenodeidstwdirid(tdagoptencodingterrortfilesettmatchtobsoletetpatchtpathutiltphasestpycompattrepoviewtscmutiltsparsetsubrepot subrepoutiltutil(tdateutilt stringutiltbasectxc B@seZdZdZdZejeZdZdZ dZ dZ dZ dZ d Zd Zd Zed Zd ZdZdZdZdZdZdZdZdZd.dZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&d Z'd!Z(d"Z)d#Z*e+d$Z,d%Z-d&Z.d.d.d.d'e/d.d(Z0d.d.d.d.d.d)d)d.d.d* Z1d+Z2d,Z3d.d.e/e/e/e/d-Z4RS(/sIA basectx object represents the common logic for its children: changectx: read-only context that is already present in the repo, workingctx: a context that represents the working directory and can be committed, memctx: a context that represents changes in-memory and can also be committed.cC@s ||_dS(N(t_repo(tselftrepo((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt__init__;scC@st|jS(N(Rtnode(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt __bytes__>scC@sdt|jt|fS(Ns<%s %s>(ttypet__name__tstr(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt__repr__CscC@sEy,t|t|ko*|j|jkSWntk r@tSXdS(N(R#t_revtAttributeErrortFalse(Rtother((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt__eq__Fs, cC@s ||k S(N((RR*((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt__ne__LscC@s ||jkS(N(t _manifest(Rtkey((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt __contains__OscC@s |j|S(N(tfilectx(RR.((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt __getitem__RscC@s t|jS(N(titerR-(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt__iter__UscC@s |jS(sBuilds a manifest that includes the given status results, if this is a working copy context. For non-working copy contexts, it just returns the normal manifest.(tmanifest(Rtstatus((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_buildstatusmanifestXscC@s|S(sfThis internal method provides a way for child objects to override the match operator. ((RR*R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt _matchstatus^scC@sd}|jdk rB|j|jkrB|j|}n|j|}|dkro|j|}ngg} } g} g} |j|j|j} }}t| }|j|d|d|}x|jD]\}}||krqn|dkr| j |qn|\\}}\}}|dkrJ| j |q|dkrf| j |q||kr| j |q|t kr| j |q||j ||r| j |q| j |qW| rtg|D]+}||kr| s||r|^q}g|D]+}||kr| s@||r|^q}g| D]}||krS|^qS} nt j | | | | ||| S(s.build a status with respect to another contextRtcleanN(tNonetrevR6tdeletedtunknowntignoredtsettdifft iteritemstappendRtcmpRR5(RR*tsRt listignoredt listcleant listunknowntmf2tmf1tmodifiedtaddedtremovedR8R;R<R=t deletedsettdtfntvaluetnode1tflag1tnode2tflag2((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt _buildstatusdsL *          (cC@stj||jjS(N(RtstateRtui(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytsubstatescC@s|j|dS(Ni(RW(Rtsubpath((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytsubrevscC@s|jS(N(R'(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR:scC@s|jS(N(t_node(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR!scC@st|jS(N(RR!(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jS(N(R-(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR4scC@s|jS(N(t _manifestctx(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt manifestctxscC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@stj|jS(N(Rt phasenamestphase(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytphasestrscC@s|jtjkS(N(R^Rtpublic(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytmutablescC@stj||d|S(Ntbadfn(R R(RtexprRb((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt matchfilesetscC@s|jtj|jdkS(s!True if the changeset is obsoleteR(R:tobsmodtgetrevsR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jtj|jdkS(s True if the changeset is extincttextinct(R:ReRfR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRgscC@s|jtj|jdkS(s:True if the changeset is not obsolete, but its ancestor istorphan(R:ReRfR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRhscC@s|jtj|jdkS(sTrue if the changeset tries to be a successor of a public changeset Only non-public and non-obsolete changesets may be phase-divergent. tphasedivergent(R:ReRfR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRiscC@s|jtj|jdkS(sIs a successor of a changeset with multiple possible successor sets Only non-public and non-obsolete changesets may be content-divergent. tcontentdivergent(R:ReRfR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRjscC@s"|jp!|jp!|jS(sTTrue if the changeset is either orphan, phase-divergent or content-divergent(RhRiRj(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt isunstablescC@s^g}|jr"|jdn|jr>|jdn|jrZ|jdn|S(sreturn the list of instabilities affecting this changeset. Instabilities are returned as strings. possible values are: - orphan, - phase-divergent, - content-divergent. Rhsphase-divergentscontent-divergent(RhRARiRj(Rt instabilities((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRls   cC@s|jS(s)return contexts for each parent changeset(t_parents(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytparentsscC@s |jdS(Ni(Rm(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytp1scC@s.|j}t|dkr#|dS|jtS(Nii(RmtlenRR(RRn((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytp2s cC@s d|jkrey!|j||jj|fSWqetk ratj|j|tdqeXnd|jks||jkr||j kr|j ||j j|fSn|j j }y#||j j j|\}}Wn/tk rtj|j|tdnX||fS(NR-snot found in manifestt_manifestdelta(t__dict__R-tflagstKeyErrorR tManifestLookupErrorRZRtfilesRrRt manifestlogt _changesetR4tfind(RtpathtmflR!tflag((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt _fileinfos"! !  # cC@s|j|dS(Ni(R~(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytfilenode scC@s1y|j|dSWntjk r,dSXdS(Nit(R~R t LookupError(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRt scC@stj||d|S(s>return a subrepo for the stored revision of path, never wdir()t allowcreate(R(RR{R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytsubscC@stj|||S(N(Rt nullsubrepo(RR{tpctx((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytnullsubscC@stj||dtS(s]return a subrepo for the stored revision, or wdir if this is a wdir context. t allowwdir(RtTrue(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt workingsubstglobcC@sI|j}tj|j|j||||d|jd|d|d|S(Ntauditortctxt listsubreposRb(RtmatchmodRtroottgetcwdt nofsauditor(RtpatstincludetexcludetdefaultRRbtr((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s   Rc C@s}|d kr|j}n|d k r7|j|}ntj|j||d|d|d|d|d|d|d|d| S( s;Returns a diff generator for the given contexts and matcherRtchangestoptst losedatafntprefixtrelroottcopyt hunksfilterfnN(R9RoRRR?( Rtctx2RRRRRRRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR?(s  ! cC@s |jjS(N(R-tdirs(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR5scC@s|jj|S(N(R-thasdir(Rtdir((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR8sc @s|}|j|}t} t|t rNt|trNt} ||}}n|jj|}|j||}tjggggggg} |j || ||||} | rtj| j | j | j ggg| j } n|rxtj||D]\} y|j} Wntk r8d} nXtj|} | j| d| d|d|d|dt}x:t| |D])\}}|jfd|DqWqWnx| D]}|jqW| S(sreturn status of files between two nodes or node and working directory. If other is None, compare this node with working directory. returns (modified, added, removed, deleted, unknown, ignored, clean) RR=R8R<Rc3@s|]}d|fVqdS(s%s/%sN((t.0tf(RX(s7/usr/lib64/python2.7/site-packages/mercurial/context.pys tsN(RR)t isinstancet changectxRt narrowmatchR7RR5RTRIRKRJR8t itersubreposRYRuR9Rt subdirmatchertziptextendtsort(RR*RRDRERFRtctx1RtreversedRRtrev2tsubmatchRCtrfilestsfilestl((RXs7/usr/lib64/python2.7/site-packages/mercurial/context.pyR5;s<  ! !    ( N(5R$t __module__t__doc__R R"R t strmethodt__str__R&R+R,R/R1R3R6R7RTt propertycacheRWRYR:R!RR4R\RR_RaR9RdRRgRhRiRjRkRlRnRoRqR~RRtRRRRR)RR?RRR5(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR3sb           :                                RcB@sIeZdZdZdZdZeZedZedZ e dZ edZ edZ d Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdddZ e!dZ"dZ#dZ$dZ%RS( sA changecontext object makes access to data related to a particular changeset convenient. It represents a read-only context already present in the repo.cC@s,tt|j|||_||_dS(N(tsuperRR R'RZ(RRR:R!((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s cC@s0yt|jSWntk r+t|SXdS(N(thashR'R(tid(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt__hash__s cC@s |jtkS(N(R'R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt __nonzero__scC@s|jjj|jS(N(Rt changelogtchangelogrevisionR:(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRyscC@s |jjS(N(R[tread(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR-scC@s|jj|jjS(N(RRxRyR4(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR[scC@s |jjS(N(R[t readdelta(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRrscC@sM|j}|jj|j\}}|tkr;||gS||||gS(N(RRt parentrevsR'R(RRRoRq((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRms    cC@s1|j}|j|j|j|j|j|jfS(N(RyR4tusertdateRwt descriptiontextra(Rtc((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt changesets cC@s |jjS(N(RyR4(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt manifestnodescC@s |jjS(N(RyR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RyR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RyRw(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRwscC@s |jjS(N(RyR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@stj|jjjdS(Ntbranch(R ttolocalRyRtget(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@sd|jjkS(Ntclose(RyR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt closesbranchscC@s |jjS(s#Return a dict of extra information.(RyR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jj|jS(sReturn a list of byte tag names(RtnodetagsRZ(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyttagsscC@s|jj|jS(s%Return a list of byte bookmark names.(Rt nodebookmarksRZ(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt bookmarksscC@s|jjj|j|jS(N(Rt _phasecacheR^R'(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR^scC@s|jtj|jdkS(Ntvisible(R'Rt filterrevsR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pythiddenscC@stS(N(R)(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt isinmemoryscC@s6|jjj|j}g|D]}|j|^qS(sreturn list of changectx contexts for each child changeset. This returns only the immediate child changesets. Use descendants() to recursively walk children. (RRtchildrenRZ(RRtx((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscc@s6x/|jjj|jgD]}|j|VqWdS(N(RRt ancestorsR'(Rta((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs"cc@s6x/|jjj|jgD]}|j|VqWdS(srRecursively yield all children of the changeset. For just the immediate children, use children() N(RRt descendantsR'(RRM((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs"c C@s@|dkr|j|}nt|j|d|d|d|S(s&get a file context from this changesettfileidRtfilelogN(R9RR0R(RR{RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR0s c@sp|j}|dkr(|jdj}n|jjj|j|}|sRtnt|dkrq|dnx|jjj ddD]U}yt j |j|}Wnt j k rqnX|j|krPqqW|jjj|j||re|jjjtdtt|jt|fdjfdt|Dn|jS( sreturn the "best" ancestor context of self and c2 If there are multiple candidates, it will show a message and check merge.preferancestor configuration before falling back to the revlog ancestor.iitmergetpreferancestors(note: using %s as ancestor of %s and %s Rc3@s1|]'}|krtdt|VqdS(s: alternatively, use --config merge.preferancestor=%s N(RR(Rtn(tanc(s7/usr/lib64/python2.7/site-packages/mercurial/context.pys sN(RZR9RmRRtcommonancestorsheadsRRpRVt configlistRt revsymbolR tRepoLookupErrorR!tancestorR5RRtjointsorted(Rtc2twarntn2tcahsRR((Rs7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs0        "cC@s|jjj|j|jS(s.True if this changeset is an ancestor of other(RRt isancestorrevR'(RR*((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt isancestorofsc@s@fd}tjjj|}jj|S(sGenerates matching file names.c@sAtfdjDr#dSjtddS(Nc3@s.|]$}|kp%j|dVqdS(t/N(t startswith(RRC(RN(s7/usr/lib64/python2.7/site-packages/mercurial/context.pys ssno such file in rev %s(tanyRWtbadR(RNtmsg(RR(RNs7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs(RtbadmatchRRR-twalk(RRRtm((RRs7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |j|S(N(R(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytmatches$sN(&R$RRR RRt__bool__RRyR-tpropertyR[RrRmRRRRRwRRRRRRR^RRRRRR9R0R)RRRR(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR{s@                   $  t basefilectxcB@s'eZdZedZedZedZedZedZdZ e Z dZ e j e ZdZd Zd Zd Zd Zd ZedZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&d Z'd!Z(d"Z)d#Z*d$Z+d%Z,d&Z-d'Z.d(Z/e0Z1d)Z2e0d*Z3d+Z4d,Z5d-Z6d.Z7d/Z8d0Z9e0d4d4d1Z;e0d2Z<d3Z=RS(5sPA filecontext object represents the common logic for its children: filectx: read-only access to a filerevision that is already present in the repo, workingfilectx: a filecontext that represents files from the working directory, memfilectx: a filecontext that represents files in-memory, cC@s|jj|jS(N(Rtfilet_path(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_filelog/scC@shd|jkr|jSd|jkr2|jjSd|jkrQ|j|jS|jj|jSdS(Nt _changeidt _changectxt_descendantrev( RsRRR:t_adjustlinkrevRRtlinkrevt_filerev(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR3s cC@s9d|jkr"|jj|jS|jj|jSdS(Nt_fileid(RsRtlookupRRRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt _filenode@scC@s|jj|jS(N(RR:R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRGscC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt _repopathKscC@s+y|jtSWntjk r&tSXdS(N(RRR RR)(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyROs cC@sAyd|j|jfSWntjk r<d|jSXdS(Ns%s@%ss%s@???(R{RR R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR"YscC@sdt|jt|fS(Ns<%s %s>(R#R$R%(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR&ascC@s9yt|j|jfSWntk r4t|SXdS(N(RRRR(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRds cC@sWy>t|t|ko<|j|jko<|j|jkSWntk rRtSXdS(N(R#RRR(R)(RR*((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR+js * cC@s ||k S(N((RR*((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR,qscC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytfilerevtscC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRvscC@s|jj|jS(N(RRtR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_flagsxscC@s|jS(N(R (R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRt{scC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR}scC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR:scC@s|jj|jS(N(RRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RR!(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR!scC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RRw(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRwscC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RR^(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR^scC@s |jjS(N(RR_(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR_scC@s |jjS(N(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jjS(N(RRl(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRlscC@s |jjS(N(RR4(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR4scC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jS(N(t_copied(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytrenamedscC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@st|jS(N(Rptdata(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytsizescC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR{scC@s0ytj|jSWntk r+tSXdS(N(RtbinaryR tIOErrorR)(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytisbinarys cC@sd|jkS(NR(Rt(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytisexecscC@sd|jkS(NR(Rt(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytislinkscC@stS(swhether this filectx represents a file not in self._changectx This is mainly for merge code to detect change/delete conflicts. This is expected to be True for all subclasses of basectx.(R)(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytisabsentscC@s|jr|j|S|jdkrM|jjse|jd|jkse|j|jkr|jj|j|jSt S(sVcompare with other file context returns True if different than fctx. iN( t _customcmpRBRR9Rt_encodefilterpatsR RR R(Rtfctx((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRBs   cC@sp|j}|jj}|j}|j}||kr=|St|dd}d}|dkrg|jdjD]} | j^qu} t }n |g} |dkr|j | |d|}}n||krl|dkr|j | |d|}n|j } |j } xZ|D]O} |j | }| |dkr| ||djj| kre| SqqWn|S(s}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. :srcrev: the changeset revision we search ancestors from :inclusive: if true, the src revision will also be checked t_ancestrycontextt inclusiveiiN(Rt unfilteredRRxRtgetattrR9RnR:RRRRRtreadfastR(RtsrcrevRRtclR|tlkrt memberanctiteranctptrevstfnodeR{Rtac((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs4     ,        #cC@sQt|}d|kp!d|k}|rC|j|jdtS|jSdS(sreturn 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. RRRN(tvarsRR:RR(Rtattrst hastoprev((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytintrorevs cC@s;|j}|j|kr"|S|j|jd|S(szReturn filectx having identical contents, but pointing to the changeset revision where this filectx was introducedtchangeid(R(R:R0R(RR(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt introfilectx s cC@st|j|d|d|}dt|ksBdt|kri|j|_t|dd|_n6dt|kr|j|_t|dd|_n|S(s@create parent filectx keeping ancestry info for _adjustlinkrev()RRRRRRN(R0RR%R:RRR9R(RR{RRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_parentfilectxs$ c C@s|j}|j}|jj|j}g|D]!}|tkr.|||f^q.}|j|j}|r|jd|d|d|jj|dfng|D]$\}}} |j ||| ^qS(Nii( RRRnRRR tinsertRRR+( RRtflRnR!tplRR{R#R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRn%s  . 4cC@s|jdS(Ni(Rn(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRo9scC@sH|j}t|dkr&|dSt|j|jddd|jS(NiiRiR(RnRpR0RRR(RR!((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRq<s c @stjfdfd}j}t|dddkrjj}|jdkr|jg|j D]}|j^qdt }n|j|jgdt }||_ nt j ||d|d|S(sDReturns a list of annotateline objects for each line in the file - line.fctx is the filectx of the node where that line was last changed - line.lineno is the line number at the first appearance in the managed file - line.text is the data on that line (including newline character) c@sjj|S(N(RR(R(R(s7/usr/lib64/python2.7/site-packages/mercurial/context.pytJsc@s|j|j}sMg|D]$}|j|jkr |^q }nx5|D]-}d|jkrT|j|_qTqTW|S(NR(RRnR{RsR(RR.R!(tfollowtgetlog(s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRnLs 4 RRtskiprevstdiffoptsN(Rt lrucachefuncR*RR9RRR:RRnRRR tannotate( RR0R2R3RntbaseRR!R$((R0R1Rs7/usr/lib64/python2.7/site-packages/mercurial/context.pyR5Bs  +  cc@si}|}|rd}nd}xetrx4|j| D]"}|||j|jfR$RRRRRRRRRRR"R RRR&RR+R,RRR RtRR:RR!RRRRwRRRR^R_RRlR4RR RR R{RRRRR)RRBRR(R*R+RnRoRqR9R5RR>(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR'sn                                     0      . R0cB@szeZdZd d d d dZedZd dZdZdZ dZ dZ edZ d Z RS( saA filecontext object makes access to data related to a particular filerevision convenient.cC@s||_||_|dk sO|dk sO|dk sOtd|||f|dk rg||_n|dk r||_n|dk r||_n|dk r||_ndS(scchangeid must be a revision number, if specified. fileid can be a file revision or node.s.bad args: changeid=%r, fileid=%r, changectx=%rN(RRR9tAssertionErrorRRRR(RRR{R)RRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s           cC@s>y|j|jSWn%tjk r9|jj|jSXdS(N(RRR tFilteredRepoLookupErrorR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRsc C@s(t|j|jd|d|jd|S(sMopens an arbitrary revision of the file without opening a new filelogRRR)(R0RRR(RRR)((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR0scC@s|jj|jdtS(Ntraw(RtrevisionRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytrawdatascC@s|jj|jS(slow-level revlog flags(RRtR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytrawflagsscC@sy|jj|jSWndtjk r}|jjjdddkrLdStjt dt |jdt dnXdS(NtcensortpolicytignoreRscensored node: %sthints"set censor.policy to ignore errors( RRRR tCensoredNodeErrorRRVtconfigtAbortRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s|jj|jS(N(RR R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s|jj|j}|sdS|j|jkr;|S|j}|j}xK|jjD]:}y||j |krdSWq`t j k rq`Xq`W|S(s#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 RR9R:RR{RRnRR R(RR tnameR#R!((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s   c C@sJ|jj|j}g|D]*}t|j|jd|d|j^qS(NRR(RRRR0RR(RRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRsN(R$RRR9R RRR0RCRDR R R R(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR0s    tcommittablectxcB@seZdZdd$d$d$d$dZdZejeZdZ e Z dZ e dZ e dZe dZe d Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&d Z'd!Z(d"Z)e*e+e+d#Z,RS(%sA committablectx object provides common functionality for a context that wants the ability to commit, e.g. workingctx or memctx.RcC@stt|j|d|_d|_||_|rLtj||_ n|r^||_ n|rp||_ ni|_ |r|j |_ nd|j krytj|jjj}Wn&tk rtjtdnX||j ds(RRRURR(RR((Rps7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs cc@sex|jD] }|Vq WxE|jjjg|jD]}|j^q2D]}|j|VqKWdS(N(RmRRRR:(RR!R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs  )cC@s|jjjvx1|j|jD]}|jjj|q*Wx'|jD]}|jjj|qTW|jjj|WdQX|jjj |jj dS(sQPerform post-commit cleanup necessary after committing this ctx Specifically, this updates backing stores this working context wraps to reflect the fact that the changes reflected by this workingctx have been committed. For example, it marks modified and added files as normal in the dirstate. N( RRUt parentchangeRIRJtnormalRKtdropt setparentstwritetcurrenttransaction(RR!R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt markcommitteds cC@stS(N(R)(RtmissingRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytdirtysN(-R$RRR9R R"R RRRRReRRgRRRQRPRYRRRRRwRIRJRKR;RRRRRRR^RRRtRRRRRwR)RRy(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRMsL                             t workingctxcB@seZdZddddddZdZdZdZedZ dZ ddZ e e e d Zdd Zdd Zd Zd Zdddde ddZdZdZdZe e e dZedZdZdZdZdZRS(syA workingctx object makes access to data related to the current working directory convenient. date - any valid date string or (unixtime, offset), or None. user - username string, or None. extra - a dictionary of extra values, or None. changes - a list of file lists as returned by localrepo.status() or None to use the repository status. RcC@s)tt|j||||||dS(N(RRzR (RRRWRRRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scc@s9|jj}x&|D]}||dkr|VqqWdS(NR(RRU(RRMR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR3s  cC@s|jj|dkS(Ns?r(RRU(RR.((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR/scC@s ttS(N(RR (R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@sp|jjj}|dtkr/|d }n|jj}g|D]'}t|j|jj||^qES(Nii(RRURnRRRRR:(RR!tunfiR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRms  cC@s|jtt|j|S(N(R-RRzR~(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR~scC@st|j|d|d|S(s-get a file context from the working directoryRzR(tworkingfilectxR(RR{R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR0scC@sx6t|jD]%}|j|jd|rtSqW|rK|jp|ro|j|jjkp|jp|j p|j p|o|j S(s-check whether a working directory is modifiedRx( RRWRRyRRqRRoRIRJRKR;(RRxRRRC((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRys$$c @s|jj|jj|jj}fd}g}|jjj}x|D]}tj|tj j |y||}Wn>t k r|j t d|||j|qWnX|jdd} | dkr.|j| kr.|j t d|d|jd||fntj|jpOtj|js|j t d |||j|qW|d kr|j t d ||qW|d krj|qWj|qWW|SWdQXdS( Nc@sjtj|S(N(tpathtoRR(R(RpR(s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR/ss%s does not exist! RVslarge-file-limitiso%s: up to %d MB of RAM may be required to manage this file (use 'hg revert %s' to cancel the pending addition) ii@Bs:%s not added: only files and symlinks supported currently tamns%s already tracked! R(RtwlockRVRUtwvfstlstatRt checkportabletosR{RRnRRRAt configbytestst_sizetstattS_ISREGtst_modetS_ISLNKt normallookuptadd( RtlistRRVtuipathtrejectedRRtsttlimit((RpRs7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs6   %$ c @s|jj|jjfd}g}x|D]}||jjkr|jjjtd|||j|q;|jj|dkr|jjj|q;|jjj|q;W|SWdQXdS(Nc@sjtj|S(N(R}RR(R(RpR(s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR/ss%s not tracked! R( RRRURVRRRAtremoveRs(RRwRRRR((RpRs7/usr/lib64/python2.7/site-packages/mercurial/context.pytforgets  #c C@s|j}|jj|jj}x|D]}|jj|dkrt|jjjtd|j|q/||dkr|d|p|d|}|j}|jj |||j |jjj |q/WWdQXdS(NRs%s not removed! ii( RnRRRURVRRR}R twwriteRtRr(RRtpctxsRpRRtt((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytundelete's   ), cC@sOy|jjj|}WnXtk rs}|jtjkrCn|jjjtd|jj j |dSXt j |j pt j|j s|jjjtd|jj j |n|jjs|jj |dkr|jj j|n,|jj |dkr/|jj j|n|jj j||WdQXdS(Ns%s does not exist! s1copy failed: %s is not a file or a symbolic link t?R(RRRRnterrnotENOENTRVRRRUR}RRRRRRRR(RtsourcetdestRterr((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR4s"$Rc C@sb|j}tj|j }tj|j|j||||d|jd|d|d|d|S(NRRRRbticasefs(RRtfscasesensitiveRRRRR( RRRRRRRbRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRIs   cC@s| s|jjjr|Sg}x|D]}|j|dkr||j}|dkst|dksd|kstj|r|jjj d|q'qn|j |q'W|S(NRRis s*ignoring suspect symlink placeholder "%s" ( RRUt _checklinkRtR RpRRRVtdebugRA(RRwtsaneRRM((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_filtersuspectsymlinkUs * cC@s|sgggfSg}g}g}|jd}xt|D]}yb||ks|j||j|ks||j||r|j|n |j|Wq?ttfk r|j|q?Xq?W|||fS(Ni(RmRRtRBRARRn(RRwRIR;tfixupRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt _checklookupis  *c C@s'|jj}|s|r#zy|jjj}|jjt|jjj|kr|r|jjj}x|D]}||qzW|jj}|jjj|n|rx|D]}|||qWqn|jj j dWdQXWnt j k r nXWd|jj XndS(s1update dirstate for files that are actually cleans*skip updating dirstate: identity mismatch N(Rt postdsstatusRUtidentityRR)RrRvRuRVRR t LockErrortclearpostdsstatus( RR5Rt poststatustoldidRrRttrtps((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_poststatusfixups(   c C@s4g}d|kr$t|j}n|jjj||d|d|d|\}}g}|r|j|\} } }|jj| |jj| |r|r|j j|qn|j |||j r0|j s|j s|j r$tj|j|j|j|jggg|_q0||_n|S(s7Gets the status from the dirstate -- internal use only.s.hgsubR=R8R<(RRWRRUR5RRIRR;R8RtalwaysR<R=RRJRKRR( RRR=R8R<RoRBRCRt modified2tdeleted2((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt_dirstatestatuss&    cC@s|j|jS(sLgenerate a manifest corresponding to the values in self._status This reuse the file nodeid from parent, but we use special node identifiers for added and modified files. This is used by manifests merge to see that files are different and by update logic to avoid deleting newly added files. (R6RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR-s cC@s|j}|djj}|j}xut|jft|jffD]U\}}xF|D]>}||||jjjdd}|jjj|jd|d|dS(s+wraps unlink for a repo's working directoryt experimentaltremoveemptydirst ignoremissingtrmdirN(RRVt configboolRt unlinkpathR(RRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRzscK@s&|jj|j||d||dS(swraps repo.wwritetbackgroundcloseN(RRR(RR RtRtkwargs((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRuscC@s9|jj|jdkr5|jjj||jndS(smarks this file a copy of `src`tnmaN(RRURR(Rtsrc((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt markcopiedscC@s|jj}|j}|j||jjjddr|j|ro|j| ro|j|dt nxut t t j |D]&}|j|r|j|PqqWn/|j|r|j| r|j|ndS(ssRemoves conflicting items in the working directory so that ``write()`` can be called successfully. Rsmerge.checkpathconflictstforciblyN(RRRRRVRtisdirRtrmtreeRRRRtfinddirst isfileorlinktunlinkt removedirs(RRRR!((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyt clearunknowns   "  cC@s |jjj|j||dS(N(RRtsetflagsR(RRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRsN(R$RRR9R RRR R R RRRRRBR)RRuRRR(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR|Ks           toverlayworkingctxcB@sIeZdZdZdZdZedZedZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZddZdZdZdZdZdZd d d d d d dZdZdZdZdZ d d ddZ!d dZ"RS(!sWraps another mutable context with a write-back cache that can be converted into a commit context. self._cache[path] maps to a dict with keys: { 'exists': bool? 'date': date? 'data': str? 'flags': str? 'copied': str? (path or None) } If `exists` is True, `flags` must be non-None and 'date' is non-None. If it is `False`, the file was deleted. cC@s$tt|j||jdS(N(RRR R8(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s)||_|g|_tj|ddS(NR-(t _wrappedctxRmRtclearcachedproperty(Rt wrappedctx((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytsetbases  cC@s|j|rj|j|drT|j|dr@|j|dS|j|jSq{tjd|n|j|jSdS(NRR sNo such file or directory: %s(tisdirtyt_cacheRR R tProgrammingError(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s  cC@s|j}|djj}|j}x4|jD]&}t||<|j|||q8Wx4|jD]&}t||<|j|||qoWx|j D] }||=qW|S(Ni( RnR4RRgRJRRRIRRK(RRnR[R}R{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR-s     c@sfd}|S(Nc@sj|dS(NRt(R(R{(R(s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs((RR((Rs7/usr/lib64/python2.7/site-packages/mercurial/context.pyRgscC@s$t|j|j|jS(N(RRJRIRK(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRwscC@s@g|jjD],}|j|dr|j|r|^qS(NR(Rtkeyst_existsinparent(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRIs'cC@sAg|jjD]-}|j|dr|j| r|^qS(NR(RRR(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRJs'cC@sAg|jjD]-}|j|d r|j|r|^qS(NR(RRR(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRKscC@stS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s3|j|r|j|dS|j|jSdS(NR(RRRR(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytfiledatescC@s6|j|r#||j|dtt|j||||||_||_||_dS(N(RRR Rt_parentR(RRR{RR<((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s   cC@s|j|jkS(N(R (RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRBscC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jj|jS(N(RR R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s|jj|jS(N(RRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s |jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jj|jS(N(RRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@sB|jj|j}|sdS||jjdjj|tfS(Ni( RRRR9RRmR-RR(RR{((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s|jj|jS(N(RR R(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s|jj|j|dS(N(RRR(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@sdS(N((R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscC@s|jj|jS(N(RRtR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRtscC@s|jj|j||S(N(RRR(RRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRscK@s|jj|j|||S(N(RRuR(RR RtRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRu scC@s|jj|jS(N(RRR(RR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@sdS(N((R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRsN(R$RRR9R RBRR RRRR R RRRtRR)RuRR(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs"              tworkingcommitctxcB@sDeZdZdddddZeeedZedZRS(sA workingcommitctx object makes access to data related to the revision being committed convenient. This hides changes in the working directory, if they aren't committed in this context. RcC@s)tt|j||||||dS(N(RRR (RRRRWRRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scC@s|r4g|jD]}||jkr|^q}ng}tjg|jjD]}||rM|^qMg|jjD]}||ru|^qug|jjD]}||r|^qggg|S(sReturn matched files only in ``self._status`` Uncommitted files appear "clean" via this context, even if they aren't actually so in the working directory. (R-t _changedsetRR5RRRIRJRK(RRR=R8R<R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRs..((cC@s<t|jj}|j|jj|j|jj|S(s8Return the set of files changed in this context (R>RRRItupdateRJRK(Rtchanged((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR.sN( R$RRR9R R)RRR(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRsc@sifd}|S(sCreate a filectxfn that caches based on the path. We can't use util.cachefunc because it uses all arguments as the cache key and this creates a cycle since the arguments include the repo and memctx. c@s-|kr%||||t_filesR RTRSRWRRt filestoreRtcallableRRt _filectxfnRNtsavecommitmessage(RRRnRWRwt filectxfnRRRRRR!RoRq((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR s&"   )    cC@s|j|j||S(spget a file context from the working directory Returns None if file doesn't exist and should be removed.(RR(RR{R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR0scC@s|jj|S(scommit context to the repo(Rt commitctx(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pytcommitscC@s|jd}|jj}x|jjD]}t|| scC@stj|jdS(N(RRR(R((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyR scK@s9| s tt|jd}|j|WdQXdS(Ntwb(R?RRRu(RR RtRR((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRu s N( R$RRR9R RBR{RtR R>RRu(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyRf s      (;t __future__RRRRRti18nRR!RRRRRRRR RR R R R RRRReRRRRRRRRRRtutilsRRRtobjectRRRR0RMRzRR|RRRRRRRRRR(((s7/usr/lib64/python2.7/site-packages/mercurial/context.pyts>    : j Iaja/X6;$   t*_