\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sAddlmZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z m Z mZmZmZmZmZmZmZejdZejZejZdZejZd efd YZd efd YZd ZdefdYZ defdYZ!dS(i(tabsolute_importNi(t_(tnullid( tencodingterrortmatchtpathutiltpolicytpycompattscmutilttxnutiltutiltparsersit repocachecB@seZdZdZRS(sfilecache for files in .hg/cC@s|jj|S(N(t_openertjoin(tselftobjtfname((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR(s(t__name__t __module__t__doc__R(((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR &st rootcachecB@seZdZdZRS(s*filecache for files in the repository rootcC@s |j|S(N(t_join(RRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR-s(RRRR(((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR+scC@sL|j\}}ztj|tjSWdtj||j|XdS(s!Get "now" timestamp on filesystemN(tmkstemptostfstattstattST_MTIMEtclosetunlink(tvfsttmpfdttmpname((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt _getfsnow0s  tdirstatecB@seZdZejdZdZedZe dZ e ddZ e dZ dZed d Zed Zed Zed ZedZdZdZedZdZd?dZdZdZdZdZeZdZ dZ!dZ"dZ#e$dZ%dZ&dZ'dZ(d Z)d!Z*d"Z+d#Z,d$Z-d%Z.d&Z/d'Z0d(Z1d)Z2d*Z3e4d?d+Z5e4d?d,Z6e4e4d-Z7d.Z8d?d/Z9d0Z:d1Z;d2Z<d3Z=d4Z>d5Z?d6Z@d7ZAeBd8ZCd9ZDd:ZEd;ZFd<ZGd=ZHd>ZIRS(@cC@s||_||_||_||_tj||_t|_d|_ ||_ i|_ d|_ d|_ d|j |_i|_d|_t|_t|_dS(sCreate a new dirstate object. opener is an open()-like callable that can be used to open the dirstate file; root is the root of the directory tracked by the dirstate. iR#s %s.pendingN(Rt _validatet_roott_sparsematchfnRt normasprefixt_rootdirtFalset_dirtyt_lastnormaltimet_uit _filecachet_parentwriterst _filenamet_pendingfilenamet_plchangecallbackstNonet_origpltsett _updatedfilest dirstatemapt_mapcls(Rtopenertuitroottvalidatet sparsematchfn((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt__init__;s              cc@s'|jd7_dV|jd8_dS(sContext manager for handling dirstate parents. If an exception occurs in the scope of the context manager, the incoherent dirstate won't be written when wlock is released. iN(R.(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt parentchangeUscC@s |jdkS(ssReturns true if the dirstate is in the middle of a set of changes that modify the dirstate parent. i(R.(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytpendingparentchangefscC@s(|j|j|j|j|_|jS(sAReturn the dirstate contents (see documentation for dirstatemap).(R7R,RR%t_map(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR@ls!cC@s |jS(sThe matcher for the sparse checkout. The working directory may not include every file from a manifest. The matcher obtained by this property will match a path if it is to be included in the working directory. (R&(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_sparsematcherrs tbranchcC@sSy |jjdjpdSWn,tk rN}|jtjkrJndSXdS(NRBtdefault(RtreadtstriptIOErrorterrnotENOENT(Rtinst((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_branchs  cC@s |jjS(N(R@tparents(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_plscC@s|jj|S(N(R@t hastrackeddir(Rtd((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pythasdirss .hgignorecC@sg|j}|s%tj|jdSg|D]}d|^q,}tj|jdg|d|jjS(Nts include:%stwarn(t _ignorefilestmatchmodtneverR%RR,RQ(Rtfilestftpats((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_ignores  cC@s"|jjddo!tjdkS(NR9tslasht/(R,t configboolRtossep(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_slashscC@stj|jS(N(R t checklinkR%(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt _checklinkscC@stj|jS(N(R t checkexecR%(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt _checkexecscC@stj|jd S(Ns.hg(R tfscasesensitiveR(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt _checkcasescC@s |j|S(N(R((RRV((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRsc@stjr%jr%fd}|S|jrMfd}|Sjrlfd}|SSdS(Nc@sZyBtjj|}tj|r.dStj|rAdSWntk rUnXdS(NtltxRP(RtlstatRR t statislinkt statisexectOSError(Retst(R(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRVs c@s9tjjj|rdSd|kr5dSdS(NRdReRP(RtpathtislinkR(Re(tfallbackR(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRVs c@s6d|krdStjj|r2dSdS(NRdReRP(R tisexecR(Re(RmR(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRVs (R_Ra(Rt buildfallbackRV((RmRs8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytflagfuncs    cC@s)|jjdd}|r|StjS(NR9tforcecwd(R,tconfigRtgetcwd(RRq((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_cwdscC@si|j}||jkrdS|j}tj|sD|tj7}n|j|ra|t|S|SdS(sReturn the path from which a canonical path is calculated. This path should be used to resolve file patterns or to convert canonical paths back to file paths for display. It shouldn't be used to get real file paths. Use vfs functions instead. RPN(RtR%R t endswithsepRR\t startswithtlen(Rtcwdtrootsep((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRss  cC@sM|dkr|j}ntj|j||}|jrItj|S|S(N(R2RsR tpathtoR%R]tpconvert(RRVRxRk((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRzs    cC@s|jj|ddS(sReturn the current state of key (a filename) in the dirstate. States are: n normal m needs merging r marked for removal a marked for addition ? not tracked t?i(R|(R@tget(Rtkey((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt __getitem__s cC@s ||jkS(N(R@(RR~((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt __contains__scC@stt|jS(N(titertsortedR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt__iter__scC@s |jjS(N(R@t iteritems(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytitemsscC@s#g|jD]}|j|^q S(N(RLR$(Rtp((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRK scC@s|j|jdS(Ni(R$RL(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytp1 scC@s|j|jdS(Ni(R$RL(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytp2scC@stj|jS(N(RttolocalRJ(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRBsc C@sz|jdkrtdnt|_|jd}|jdkrR|j|_n|jj||i}|t krv|t krv|jj j |jj }x|D]}|jj |}|dkrqn|ddkr|jjj |}|r|||x|j jD]\}}|ddkr|d|krddl}|j} t| t| |} | |} |j| | | }PqqWn|j j||d|_t|_dS(Ntdebugsdirstate.delaywriteiRi(R3R2RLRR1RR RRRRR,t configintR@ttimetinttsleepRR+R)R*( RRjtcRRt delaywriteRVteRtclocktstarttend((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRos&!"        cC@sT|dkrtS|j|r#tSx*tj|D]}|j|r3tSq3WtS(Nt.(R)RXRR R(RRVR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt _dirignores cC@sg}tjj|jdr:|j|jdnxf|jjdD]R\}}|dkst|jdrM|jtjj|j t j |qMqMW|S(Ns .hgignoreR9tignoresignore.( RRkRRtappendR,t configitemsRvRR(R t expandpath(RRUtnameRk((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRRs/c C@s tj|j}t}x|r|j}tj||jjdt }x|D]\}}}tj |d\} } | dkr| |krX|j | qXqXntj |j dg|gd|jj} | |rX|||fSqXW|j|q!WdS(Nt sourceinfotglobt subincludeRPRQi(NiRP(t collectionstdequeRRR4tpopleftRStreadpatternfileR,RQRt _patsplitRRR%RR2( RRVRUtvisitedtitpatternstpatterntlinenotlinetkindRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_ignorefileandlines$       c#C@sd}|j}|j}|j}tj}tj}tj} tj} tj } |j } g} | j }g}|j }|j r|j r|j}nd}t|j}|jd\}}x|t|kr]|t|kr]||d}|||kr|d7}qnx0|t|krO||j|rO||=q W|d7}qW| sqd|kr}dg}ntj|}d|d||n|||fnQ|| ksi|| krv|||   1    /c& C@s*|||}}}gggggf\} } } }}ggg} } }|j}|j|j}|j}| j}| j}| j}|j}|j}| j}| j}|j}|j}|j}|j}|jj}|j }|p|j d k }x|j ||||d|j D]\}} ||s|sM||ro||ro|ry||qyq#||q#n||}!|!d}"|!d}#|!d}$|!d}%| r|"dkr||q#|"dkr|$dkr$|$| jkr |$| jt@ks<|#| jAd@r$|s<|$d ks<||krI||q|%| tjkr|%| tjt@kr||q| tj|kr||q|r||qq#|"d kr||q#|"d kr||q#|"d kr#||q#q#W| tj| | | | |||fS(s|Determine the status of the working copy relative to the dirstate and return a pair of (unsure, status), where status is of type scmutil.status and: unsure: files that might have been modified since the dirstate was written, but need to be read to be sure (size is the same but mtime differs) status.modified: files that have definitely been modified since the dirstate was written (different size or mode) status.clean: files that have definitely not been modified since the dirstate was written RNiiiitnmaRi@iRRRN(R@tpreloadRRRRPRRaRR+RGR2RURRRRRRR tstatus(&RRRRMtcleanRt listignoredt listcleant listunknowntlookuptmodifiedtaddedtremovedtdeletedR"t dcontainstdgettladdtmaddtaaddtuaddtiaddtraddtdaddtcaddtmexactROR`RRRNtfnRjttRRRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRXst$                           "          c@s|j|jrjS|j}|jrZg|D]}|kr>|^q>S|jrtfd|Drt|SgD]}||r|^qS(sT return files in the dirstate (in whatever state) filtered by match c3@s|]}|kVqdS(N((t.0Rm(R"(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pys _s(R@RFtkeysRURRHR5R(RRRURV((R"s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytmatchesSs     #( cC@s|r |jS|jSdS(N(R0R/(RR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_actualfilenameescC@s|j|}|js+|jj| rS|j|j|ddtdtn|r|jd|jf|jdd|j|ddn|jj |t j |jj ||jj |dtdS( s&Save current dirstate into backup fileRRRR#RRthardlinkN( RrR*RRRRRR/t registertmpt tryunlinkR tcopyfileR(RRt backupnameR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt savebackupks cC@sp|j|j|}|j}tj|j||j|rV|j|n|j||dtdS(sRestore dirstate by backup fileRN( RRrRR tsamefileRRtrenameR(RRRwRto((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt restorebackups   $cC@s|jj|dS(sClear backup fileN(RR(RRRw((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt clearbackupsN(JRRR=t contextlibtcontextmanagerR>R?t propertycacheR@tpropertyRAR RJRLRORRXR]R_RaRcRRpRtRsR2RzRRRRRRKRRRBRRRRRRRRRRRRRRRRR)RRRRRRRRRRRRRR3RRURXRqRrRxR|R}(((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR#9s|        "          )                    `    R6cB@sdeZdZdZedZedZdZdZeZ dZ dZ d dZ d Zd Zd Zd Zd ZdZdZdZdZedZdZdZedZedZdZdZdZdZdZ edZ!edZ"edZ#edZ$RS(!sdMap encapsulating the dirstate's contents. The dirstate contains the following state: - `identity` is the identity of the dirstate file, which can be used to detect when changes have occurred to the dirstate file. - `parents` is a pair containing the parents of the working copy. The parents are updated by calling `setparents`. - the state map maps filenames to tuples of (state, mode, size, mtime), where state is a single character representing 'normal', 'added', 'removed', or 'merged'. It is read by treating the dirstate as a dict. File state is updated by calling the `addfile`, `removefile` and `dropfile` methods. - `copymap` maps destination filenames to their source filename. The dirstate also provides the following views onto the state: - `nonnormalset` is a set of the filenames that have state other than 'normal', or are normal but have an mtime of -1 ('normallookup'). - `otherparentset` is a set of the filenames that are marked as coming from the second parent when the dirstate is currently being merged. - `filefoldmap` is a dict mapping normalized filenames to the denormalized form that they appear as in the dirstate. - `dirfoldmap` is a dict mapping normalized directory names to the denormalized form that they appear as in the dirstate. cC@sC||_||_||_d|_d|_t|_d|_dS(NR#( R,RR%R/R2t_parentsR)t _dirtyparentst _pendingmode(RR9R8R:((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR=s      cC@si|_|j|jS(N(R@RD(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR@s  cC@si|_|j|jS(N(RR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs cC@s|jj|jj|jtttj|dtj|dtj|dtj|dtj|dtj|ddS(Nt_dirst_alldirsRRRR(R@RRRRR tclearcachedproperty(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs  cC@s |jjS(N(R@R(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s t|jS(N(RwR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt__len__scC@s t|jS(N(RR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s|jj||S(N(R@R}(RR~RC((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR}scC@s ||jkS(N(R@(RR~((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s |j|S(N(R@(RR~((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s |jjS(N(R@Rp(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRpscC@s |jdS(s5Loads the underlying data, if it's not already loadedN(R@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRWscC@s|dkr.d|jkr.|jj|n|dkr\d|jkr\|jj|nt|||||j|<|dks|dkr|jj|n|dkr|jj|ndS( s#Add a tracked file to the dirstate.s?rRR|RRiiN( RRtaddpathRt dirstatetupleR@RRR(RRVRRRRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs cC@s|dkr.d|jkr.|jj|n|dkr\d|jkr\|jj|nd|jkrtj|}|jj|dnt dd|d|j |<|j j |dS( s Mark a file as removed in the dirstate. The `size` parameter is used to store sentinel values that indicate the file's previous state. In the future, we should refactor this to be more explicit about what that state is. s?rRR|RRRiN(RRtdelpathRRR RRRR2RR@RR(RRVRRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s|jj|ddk }|rt|dkrOd|jkrO|jj|nd|jkrt|jj|qtnd|jkrtj|}|j j|dn|j j ||S(sm Remove a file from the dirstate. Returns True if the file was previously recorded. RRRRN( R@RR2RRRRR RRRR(RRVRRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@sx|D]|}|j|}|dk r|ddkr|d|krt|d|d|dd|j|<|jj|qqWdS(NiRiiii(R}R2RR@RR(RRURRVR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR)s  ,(cC@sytj|jSWntk rt}t}x}|jjD]l\}}|ddksr|ddkr|j|n|ddkrF|ddkrF|j|qFqFW||fSXdS(s4Compute the nonnormal dirstate entries from the dmapiRiiiiN(R tnonnormalotherparententriesR@tAttributeErrorR4RR(RtnonnormRRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytnonnormalentries0s     cC@sy tj}Wntk r nX||jtjtjSi}tj}x@|jjD]/\}}|ddkrY||||s     cC@s ||jkS(so Returns True if the dirstate contains a tracked (not removed) file in this directory. (R(RRN((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRMSscC@s ||jkS(sn Returns True if the dirstate contains a file (tracked or removed) in this directory. (R(RRN((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyROZscC@stj|jdS(NR(R tdirsR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRascC@stj|jS(N(R RR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRescC@sqtj|j|j|j\}}|jdk rd|j|krd|jtj t dn||_|S(Ns1working directory state may be changed parallelly( R t trypendingR%RR/RR2RRRR(RtfpR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_opendirstatefileis $  cC@s|jsy)|j}|jd}|jWn1tk re}|jtjkr\nd}nXt|}|dkr|d |dd!f|_q|dkrttf|_qt j t dn|jS(Ni(RPiis(working directory state appears damaged!( RRRDRRFRGRHRwRRRR(RRRjterrRd((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRKrs       cC@s||f|_t|_dS(N(RRR(RRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s0tjj|jj|j|_y.|j}z|j}Wd|j XWn,t k r}|j t j kr|ndSX|sdStj tdrtjt|d|_ntjtj}||j|j|}|js|j|n|jj|_|jj|_|jj|_dS(Ntdict_new_presizediG(R tfilestattfrompathRRR/RRRDRRFRGRHt safehasattrR RRwR@tnogctparse_dirstateRRRRRR}(RRRjRRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRDs,    cC@sZ|jtj|j|j|j||jt|_|j \|_ |_ dS(N( RR t pack_dirstateR@RRKRR)RRRR(RRjR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs   cC@s|j\}}||_|S(N(RR(RRt otherparents((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs cC@s|j\}}||_|S(N(RR(RRR((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs cC@s|j|jS(N(R@R(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRscC@s7i}tj}x!|jD]}||||s,     @     d