-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/dirstate.pyc


l\c@sddlmZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZejZejZdZejZdefdYZdefdYZd	efd
YZdS(i(tnullid(t_Nit	repocachecBseZdZdZRS(sfilecache for files in .hg/cCs|jj|S(N(t_openertjoin(tselftobjtfname((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRs(t__name__t
__module__t__doc__R(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRst	rootcachecBseZdZdZRS(s*filecache for files in the repository rootcCs
|j|S(N(t_join(RRR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRs(RR	R
R(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRstdirstatecBs?eZdZedZedZedZeddZedZ	edZ
dZed	d
Z
edZedZed
ZedZdZdZedZdZd5dZdZdZdZdZdZdZdZdZe dZ!dZ"dZ#dZ$d Z%d!Z&d"Z'd#Z(d$Z)d%Z*d&Z+d'Z,d(Z-d)Z.d*Z/d+Z0e1d5d,Z2e1e1d-Z3d.Z4d5d/Z5d0Z6d1Z7d2Z8e9d3Z:d4Z;RS(6cCsd||_||_||_tjj|d|_t|_t|_	d|_
||_i|_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.
        tiN(
Rt	_validatet_roottostpathRt_rootdirtFalset_dirtyt_dirtyplt_lastnormaltimet_uit
_filecache(Rtopenertuitroottvalidate((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt__init__s							cCs|j|jS(sYReturn the dirstate contents as a map from filename to
        (state, mode, size, time).(t_readt_map(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR 0s
cCs|j|jS(N(Rt_copymap(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR!7s
cCsi}xC|jjD]2\}}|ddkr||tj|<qqWx$|jD]}||tj|<qVWd|d<|S(Nitrt.(R t	iteritemstutiltnormcaset_dirs(Rtftnamets((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_foldmap<s
tbranchcCsSy |jjdjpdSWn,tk
rN}|jtjkrJndSXdS(NR,tdefault(RtreadtstriptIOErrorterrnotENOENT(Rtinst((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_branchGs cCsy|jd}|jd}|jt|}|dkrX|d |dd!fS|dkr|dkrtjtdnWn+tk
r}|jtj	krqnXt
t
gS(NR
i(iis(working directory state appears damaged!(RR.tclosetlenR%tAbortRR0R1R2R(Rtfptsttlterr((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_plPs

cCstj|jdS(NR"(tscmutiltdirsR (R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR'`scCs|jS(N(R'(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR>dss	.hgignorecCs|jdg}xT|jjdD]@\}}|dksL|jdr%|jtj|q%q%Wtj|j||jj	S(Ns	.hgignoreRtignoresignore.(
RRtconfigitemst
startswithtappendR%t
expandpathR?Rtwarn(RtfilesR)R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_ignoregs
cCs"|jjddo!tjdkS(NRtslasht/(Rt
configboolRtsep(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_slashoscCstj|jS(N(R%t	checklinkR(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
_checklinksscCstj|jS(N(R%t	checkexecR(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
_checkexecwscCstj|jdS(Ns.hg(R%t	checkcaseR(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
_checkcase{scCs|j|S(N(R(RR(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRscstjr%jr%fd}|S|jrMfd}|Sjrlfd}|SSdS(NcsZyBtjj|}tj|r.dStj|rAdSWntk
rUnXdS(NR:txR(RtlstatRR%t
statislinkt
statisexectOSError(RRR9(R(s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR(s
cs9tjjj|rdSd|kr5dSdS(NR:RRR(RRtislinkR(RR(tfallbackR(s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR(s
cs6d|krdStjj|r2dSdS(NR:RRR(R%tisexecR(RR(RXR(s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR(s
(RMRO(Rt
buildfallbackR(((RXRs6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytflagfuncs
			cCs
tjS(N(Rtgetcwd(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_cwdscCsi|j}||jkrdS|j}tj|sD|tj7}n|j|ra|t|S|SdS(NR(R]RR%tendswithsepRRJRAR6(Rtcwdtrootsep((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR\s		cCsM|dkr|j}ntj|j||}|jrItj|S|S(N(tNoneR\R%tpathtoRRKtpconvert(RR(R_R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRbs	
cCs|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(Rd(R tget(Rtkey((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt__getitem__s
cCs
||jkS(N(R (RRf((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt__contains__sccs#xt|jD]}|VqWdS(N(tsortedR (RRR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt__iter__scCs
|jjS(N(R R$(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR$scCs#g|jD]}|j|^q
S(N(R<R(Rtp((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytparentsscCs|j|jdS(Ni(RR<(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytp1scCs|j|jdS(Ni(RR<(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytp2scCstj|jS(N(tencodingttolocalR4(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR,scCst|_|_|jd}||f|_i}|tkr|tkrxc|jjD]O\}}|ddkrZ||jkr|j|||<n|j|qZqZWn|S(sSet dirstate parents to p1 and p2.

        When moving from two parents to one, 'm' merged entries a
        adjusted to normal and previous copy records discarded and
        returned by the call.

        See localrepo.setparents()
        iitm(	tTrueRRR<RR R$R!tnormallookup(RRmRntoldp2tcopiesR(R*((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
setparentss	
cCstj||_|jdddt}yB|j|jd|j|jd}|rk|jnWn|j	nXdS(NR,twt
atomictemps
R4(
Rot	fromlocalR4RRrtwriteR5Rtrefreshtdiscard(RR,R(tce((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt	setbranchs


cCsi|_i|_y|jjd}Wn,tk
rV}|jtjkrRndSX|sadStj}tj	zt
j|j|j|}Wd|rtjnX|j
s||_ndS(NR
(R R!RR.R0R1R2tgct	isenabledtdisabletparserstparse_dirstatetenableRR<(RR9R;t	gcenabledRk((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRs$		
	cCsFx-d	D]%}||jkrt||qqWd|_t|_dS(
NR R!R+R4R<R'RFi(s_maps_copymaps_foldmaps_branchs_pls_dirss_ignore(t__dict__tdelattrRRR(Rta((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
invalidate(s
	cCsU||krdSt|_|dk	r5||j|<n||jkrQ|j|=ndS(s=Mark dest as a copy of source. Unmark dest if source is None.N(RrRRaR!(Rtsourcetdest((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytcopy0s	cCs|jj|dS(N(R!ReRa(Rtfile((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytcopied:scCs|jS(N(R!(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRu=scCs6||dkr2d|jkr2|jj|ndS(Ns?rR'(RR'tdelpath(RR(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt	_droppath@scCs"||}|dks"|dkrtj|||jkrZtjtd|nxntj|D]Z}||jkrPn||jkrj||dkrjtjtd||fqjqjWn|dkrd|jkr|jj	|nt
|_t|||||j|<dS(NRR"s directory %r already in dirstates#file %r in dirstate clashes with %rs?rR'(
R=t
checkfilenameR'R%R7RtfinddirsR RtaddpathRrRt
dirstatetuple(RR(tstatetmodetsizetmtimetoldstatetd((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt_addpathDs

#	cCstj|j|}t|j}|j|d|j|jt@|t@||j	krj|j	|=n||j
kr||_
ndS(sMark a file normal and clean.tnN(RRSRtinttst_mtimeRtst_modetst_sizet
_rangemaskR!R(RR(R*R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytnormalVs
cCs.|jdtkr||jkr|j|}|ddkr|dd
kr|jj|}|ddkr|j|n |ddkr|j|n|r|j||ndS|ddks|dd	kr|ddkrdSn|j|d	ddd||jkr*|j|=ndS(s'Mark a file normal, but possibly dirty.iiR"iiiNRqR(ii(	R<RR R!RetmergetotherparentRR(RR(tentryR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRsds "
 0cCsh|jdtkr/tjtd|n|j|dddd||jkrd|j|=ndS(s3Mark as coming from the other parent, always dirty.is1setting %r to other parent only allowed in mergesRiiiN(R<RR%R7RRR!(RR(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRzs
cCs9|j|dddd||jkr5|j|=ndS(sMark a file added.RiiN(RR!(RR(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytaddscCst|_|j|d}|jdtkr||jkr|j|}|ddkrdd}q|ddkr|ddkrd}qntdd|d|j|<|dkr||jkr|j|=nd	S(
sMark a file removed.iiRqiRiiR"N(RrRRR<RR RR!(RR(RR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytremoves	
"
	 cCs|jdtkr |j|Stj|j|}|j|d|j|jt	@t
|jt	@||jkr|j|=ndS(sMark a file merged.iRqN(
R<RRsRRSRRRRRRRR!(RR(R*((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRs
cCs6||jkr2t|_|j||j|=ndS(sDrop a file from the dirstateN(R RrRR(RR(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytdrops	
c
Cshtj|}|jj|d}|dkrd|r?|}qd|dkrrtjjtjj|j	|}n|s|rd|kr|j
dd\}}|j|||d}|d|}qa|}qdd|kr?|j
dd\}}|j|||t}|j	d|}	|dtj
||	}ntj
||j	}||j|<n|S(NRHi(R%R&R+ReRaRRtlexistsRRtrsplitt
_normalizeRrtfspath(
RRtisknownt
ignoremissingtexiststnormedtfoldedRR(R"((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRs*	'	cCs |jr|j|||S|S(sL
        normalize the case of a pathname when on a casefolding filesystem

        isknown specifies whether the filename came from walking the
        disk, to avoid extra filesystem access.

        If ignoremissing is True, missing path are returned
        unchanged. Otherwise, we try harder to normalize possibly
        existing path components.

        The normalized case is determined based on the following precedence:

        - version of name already stored in the dirstate
        - version of name stored on disk
        - version provided via command arguments
        (RQR(RRRR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt	normalizes	cCsVi|_d|jkr(t|dni|_ttg|_d|_t|_dS(NR'i(	R RRR!RR<RRrR(R((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytclears			cCs|p	|}|j}|jx~|D]v}||krL|||j|<q&d|j|krtdddd|j|<q&tdddd|j|<q&W|tf|_t|_dS(NRRRiiii(R RtflagsRRR<RrR(RtparenttallfilestchangedfilestoldmapR(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytrebuilds	

 cCs|js
dS|jjddd}|rGddl}|j|n|jdddt}tj|j	}|j
tj|j
|j|j||jd|_t|_|_dS(Ntdebugsdirstate.delaywriteiiR
RwRx(RRt	configintttimetsleepRRrR%tfstatRRzRt
pack_dirstateR R!R<R5RRR(Rt
delaywriteRR9tnow((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyRzs	(
	cCsT|dkrtS|j|r#tSx*tj|D]}|j|r3tSq3WtS(NR#(RRFRrR=R(RR(Rk((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
_dirignorescCsFd}|j}|j}|j}tj}tj}tj}	tj	}
tj
}tj}|j}
g}|j
}g}|j
}|j|jkr|jr|j}nd}t|j}|jd	\}}x|t|krk|t|krk||d}|||kr+|d7}qnx0|t|kr]||j|r]||=q.W|d7}qW|sd|krdg}ntj|}d|d<x|D]}|r|||tt}n||}||krqny||
|}|	|j}||
krY||kr9d||<n|rL||n||nQ||ksq||kr~|||<n,||||||krd||<nWqtk
r4}||krd||<q5|d}xR|D]6}|j|r|r||n||PqqW|||jqXqW|||fS(
sGet stat data about the files explicitly specified by match.

        Return a triple (results, dirsfound, dirsnotfound).
        - results is a mapping from filename to stat result. It also contains
          listings mapping subrepos and .hg to None.
        - dirsfound is a list of files found to be directories.
        - dirsnotfound is a list of files that the dirstate thinks are
          directories and that were not found.cSstd}tj|r*td}nxtj|rHtd}nZtj|rftd}n<tj|rtd}ntj|rtd}ntd|S(Ntunknownscharacter devicesblock devicetfifotsockett	directorys"unsupported file type (type is %s)(RtstattS_ISCHRtS_ISBLKtS_ISFIFOtS_ISSOCKtS_ISDIR(Rtkind((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytbadtype siRHiR#Rs.hgN(ii(texplicitdirtbadR R%tnormpathRRSRtS_IFMTtS_IFDIRtS_IFREGtS_IFLNKRRBtmatchfntexactRQRRaRiREtsortR6RAtdicttfromkeysRRrRRVtstrerror(RtmatchtsubreposRt	matchedirtbadfntdmapRRStgetkindtdirkindtregkindtlnkkindRt	dirsfoundtfoundaddtdirsnotfoundtnotfoundaddRREtitjtsubpathtresultstfftnfR9RR3tprefixtfn((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt
_walkexplicits
													
'
(










c&Cs|rtj}tj}n-|r6|j}|j}ntj}tj}|j}|j}	|j}
|j}tj	}t
j}
tj
}tj}tj}|j}t}}||jkrt}tj}n"|jr|jrt}n|r|jr|j}t}nd}|j||\}}}|oE|pD|}g|D]}||sO|^qO}|j}x'|r|j}d}|dkrd}nd}y"|||dtd|}WnStk
r#}|jtjtjfkr|j |j!||j"qynnXxu|D]m\}}} |ri||rW|d|pZ|tt}!n|r}|d|p|}!|!|kr+||kr||!s|
r|
|!n||!n|!|kr|	s||!rd||!<qq||ks
||krj|!|kr;|	s+||!rg| ||!<qgq|	sM||!r||!r| ||!<qq|!|kr|	s||!rd||!<qq+q+WqyWx|D]
}"||"=qW|d=|r|r|r|	r|j#}#n1g|D]$}||kr||r|^q}#|#j$|rt%j&|j'dt}$xt(|#D]Z}!|$j)|!ry|
||!||!<Wqtk
rd||!<qXqOd||!<qOWqt(|#j*}!x@tj+g|#D]}%||%^qD]} | ||!<qWn|S(	s3
        Walk recursively through the directory tree, finding all files
        matched by match.

        If full is False, maybe skip some known-clean files.

        Return a dict mapping filename to stat-like object (either
        mercurial.osutil.stat instance or return value of os.stat()).

        R#Rs.hgRtskipRHtcachedN(,R%tneverRFRtalwaysRttraversedirR tosutiltlistdirRRSRRRRRRRRrREtanypatsRQRRaRRBtpopRVR1tEACCESR2RRbRtkeysRtpathutiltpathauditorRtitertchecktnextt	statfiles(&RRRRtignoredtfullR?t	dirignoreRtmatchalwayst	matchtdirRRRSRRRRRt	skipstep3RRtworkRRtwaddtndRtentriesR3R(RR9RR*tvisitt
audit_pathR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytwalk{s													
			%			")



1

/c%Cs|||}}}gggggf\}	}
}}}ggg}}
}|j}|	j}|
j}|j}|j}|j}|j}|
j}|j}|j}|j}|j}|j}|j}|p|jd
k	}x|j	||||d|j
D]\}}||kr`|s.||rP||rP|rZ||qZq||qn||}|d} |d}!|d}"|d}#|r| dkr||q| dkrt|j}$|"dkr|"|j
kr|"|j
t@ks*|!|jAd@r|s*|"d	ks*||kr7||q|#|$kr`|#|$t@kr`||q|$|kry||q|r||qq| d
kr||q| dkr||q| dkr||qqW|	|
|||
|||fS(s;Determine the status of the working copy relative to the
        dirstate and return a tuple of lists (unsure, modified, added,
        removed, deleted, unknown, ignored, clean), where:

          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)
          modified:
            files that have definitely been modified since the dirstate
            was written (different size or mode)
          added:
            files that have been explicitly added with hg add
          removed:
            files that have been explicitly removed with hg remove
          deleted:
            files that have been deleted through other means ("missing")
          unknown:
            files not in the dirstate that are not ignored
          ignored:
            files not in the dirstate that are ignored
            (by _dirignore())
          clean:
            files that have definitely not been modified since the
            dirstate was written
        RiiiitnmaRi@iRqRR"N(R RBRRROR!RRRaRR$RRRRR(%RRRRtcleanRtlistignoredt	listcleantlistunknowntlookuptmodifiedtaddedtremovedtdeletedRtladdtmaddtaaddtuaddtiaddtraddtdaddtcaddtmexactRRNtcopymaptlastnormaltimeRRR9ttRRRRR((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pytstatussn$														
	





"




N(<RR	Rt
propertycacheR R!R+RR4R<R'R>RRFRKRMRORQRR[R]R\RaRbRgRhRjR$RlRmRnR,RRvR~RRRRRuRRRRsRRRRRRRRRRRzRRRrRR&(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyR
sf					"											 		
											
	 				
	e(tnodeRti18nRR=R%R?RRRoRRRR1RR't	filecacheRRRRtobjectR
(((s6/usr/lib/python2.7/dist-packages/mercurial/dirstate.pyt<module>sT0			

Copyright © 2017 || Recoded By Mr.Bumblebee