HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/dirstate.pyo
�
1�3\c@@sAddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZmZejd�ZejZejZdZejZd	efd
��YZdefd��YZd
�Zdefd��YZ defd��YZ!dS(i(tabsolute_importNi(t_(tnullid(	tencodingterrortmatchtpathutiltpolicytpycompattscmutilttxnutiltutiltparsersi���t	repocachecB@seZdZd�ZRS(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@seZdZd�ZRS(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@s�eZd�Zejd��Zd�Zed��Ze	d��Z
ed�d��Ze	d��Z
d�Zed	�d
��Zed��Zed��Zed
��Zed��Zd�Zd�Zed��Zd�Zd?d�Zd�Zd�Zd�Zd�ZeZd�Z d�Z!d�Z"d�Z#e$d�Z%d�Z&d�Z'd�Z(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/�Z9d0�Z:d1�Z;d2�Z<d3�Z=d4�Z>d5�Z?d6�Z@d7�ZAeBd8�ZCd9�ZDd:�ZEd;�ZFd<�ZGd=�ZHd>�ZIRS(@cC@s�||_||_||_||_tj|�|_t|_d|_	||_
i|_d|_d|_
d|j
|_i|_d|_t�|_t|_dS(s�Create 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
_updatedfilestdirstatemapt_mapcls(Rtopenertuitroottvalidatet
sparsematchfn((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt__init__;s 												cc@s'|jd7_dV|jd8_dS(s�Context 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
|j�S(s�The 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_sparsematcherrstbranchcC@sSy |jjd�j�pdSWn,tk
rN}|jtjkrJ�ndSXdS(NRBtdefault(RtreadtstriptIOErrorterrnotENOENT(Rtinst((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_branchs cC@s
|jj�S(N(R@tparents(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_pl�scC@s|jj|�S(N(R@t
hastrackeddir(Rtd((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pythasdir�ss	.hgignorecC@sg|j�}|s%tj|jd�Sg|D]}d|^q,}tj|jdg|d|jj�S(Nts
include:%stwarn(t_ignorefilestmatchmodtneverR%RR,RQ(Rtfilestftpats((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_ignore�s
cC@s"|jjdd�o!tjdkS(NR9tslasht/(R,t
configboolRtossep(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_slash�scC@stj|j�S(N(Rt	checklinkR%(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
_checklink�scC@stj|j�S(N(Rt	checkexecR%(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
_checkexec�scC@stj|jd��S(Ns.hg(RtfscasesensitiveR(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
_checkcase�scC@s|j|S(N(R((RRV((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�sc@st�jr%�jr%�fd�}|S|���jrM��fd�}|S�jrl��fd�}|S�SdS(Nc@sZyBtj�j|��}tj|�r.dStj|�rAdSWntk
rUnXdS(NtltxRP(RtlstatRRt
statislinkt
statisexectOSError(Retst(R(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRV�s
c@s9tjj�j|��rdSd�|�kr5dSdS(NRdReRP(RtpathtislinkR(Re(tfallbackR(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRV�s
c@s6d�|�krdStj�j|��r2dSdS(NRdReRP(RtisexecR(Re(RmR(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRV�s
(R_Ra(Rt
buildfallbackRV((RmRs8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytflagfunc�s
			cC@s)|jjdd�}|r|Stj�S(NR9tforcecwd(R,tconfigRtgetcwd(RRq((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_cwd�scC@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%RtendswithsepRR\t
startswithtlen(Rtcwdtrootsep((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRs�s		cC@sM|dkr|j�}ntj|j||�}|jrItj|�S|S(N(R2RsRtpathtoR%R]tpconvert(RRVRxRk((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRz�s	
cC@s|jj|d�dS(s�Return 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|j��S(N(titertsortedR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt__iter__scC@s
|jj�S(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|jd�S(Ni(R$RL(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytp1
scC@s|j|jd�S(Ni(R$RL(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytp2scC@stj|j�S(N(RttolocalRJ(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRBsc	C@sz|jdkrtd��nt|_|jd}|jdkrR|j|_n|jj||�i}|t	krv|t	krv|jj
j|jj�}x�|D]�}|jj
|�}|dkr�q�n|ddkr|jjj
|�}|r|||<n|j|�q�|ddkr�|ddkr�|jjj
|�}|r_|||<n|j|�q�q�Wn|S(	s�Set 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()
        isEcannot set dirstate parent without calling dirstate.beginparentchangeitmtnii����N(R.t
ValueErrortTrueR*RLR3R2R@t
setparentsRtnonnormalsettuniontotherparentsetR}tcopymaptnormallookuptadd(	RR�R�toldp2tcopiestcandidatefilesRVtstsource((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�s4		


 
cC@s�tj|�|_|jdddtdt�}yB|j|jd�|j�|jd}|rq|j�nWn|j	��nXdS(NRBtwt
atomictempt
checkambigs
RJ(
Rt	fromlocalRJRR�twriteRR-trefreshtdiscard(RRBRVtce((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt	setbranch?s


cC@sex-dD]%}||jkrt||�qqWd|_t|_|jj�d|_d|_	dS(sCauses the next access to reread the dirstate.

        This is different from localrepo.invalidatedirstate() because it always
        rereads the dirstate. Use localrepo.invalidatedirstate() if you want to
        check whether the dirstate has changed before rereading it.R@RJRXiN(R@RJRX(
t__dict__tdelattrR+R)R*R5tclearR.R2R3(Rta((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
invalidateOs
		
	cC@s�||krdSt|_|dk	rX||jj|<|jj|�|jj|�n+|jjj|d�r�|jj|�ndS(s=Mark dest as a copy of source. Unmark dest if source is None.N(R�R*R2R@R�R5R�tpop(RR�tdest((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytcopy_s	cC@s|jjj|d�S(N(R@R�R}R2(Rtfile((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytcopiedkscC@s
|jjS(N(R@R�(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�nsc	C@s7||}|dks"|dkr�tj|�|jj|�rftjtd�tj|���nx�t	j
|�D]~}|jj|�r�Pn|jj|�}|dk	rv|ddkrvtjtd�tj|�tj|�f��qvqvWnt
|_|jj|�|jj||||||�dS(NR�trs directory %r already in dirstateis#file %r in dirstate clashes with %r(R	t
checkfilenameR@RMRtAbortRRtbytestrRtfinddirsR}R2R�R*R5R�taddfile(	RRVtstatetmodetsizetmtimetoldstateRNtentry((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_addpathqs"

	,	cC@s�tj|j|��}|tj}|j|d|j|jt@|t@�|j	j
j|d�||j	j
kr�|j	j
j|�n||jkr�||_ndS(sMark a file normal and clean.R�N(RRfRRRR�tst_modetst_sizet
_rangemaskR@R�R�R2R�tremoveR+(RRVR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytnormal�s
cC@s0|jdtkr�|jj|�}|dk	r�|ddkr�|dd
kr�|jjj|�}|ddkr�|j|�n |ddkr�|j|�n|r�|j||�ndS|ddks�|dd	kr�|ddkr�dSq�n|j	|d	ddd�|jjj
|d�dS(s'Mark a file normal, but possibly dirty.iiR�ii����i����NR�R�(i����i����(RLRR@R}R2R�tmergetotherparentR�R�R�(RRVR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s  0
cC@s�|jdtkr/tjtd�|��n||krg||dkrg|j|dddd�n|j|dddd�|jjj|d�dS(	s3Mark as coming from the other parent, always dirty.is1setting %r to other parent only allowed in mergesR�R�ii����i����N(
RLRRR�RR�R@R�R�R2(RRV((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s
cC@s3|j|dddd�|jjj|d�dS(sMark a file added.R�ii����N(R�R@R�R�R2(RRV((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��scC@s�t|_||}d}|jdtkr�|jj|�}|dk	r�|ddkrcd}q�|ddkr�|ddkr�d}|jjj|�q�q�n|j	j|�|jj
|||�|dkr�|jjj|d�ndS(	sMark a file removed.iiR�i����R�ii����N(
R�R*RLRR@R}R2R�R�R5t
removefileR�R�(RRVR�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s	
	 cC@s-|jdtkr |j|�S|j|�S(sMark a file merged.i(RLRR�R�(RRV((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s
cC@sU||}|jj||�rQt|_|jj|�|jjj|d�ndS(sDrop a file from the dirstateN(	R@tdropfileR�R*R5R�R�R�R2(RRVR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytdrop�s

	c
C@s#|dkr3tjjtjj|j|��}n|s�|r�d|kr�|jdd�\}}|j|t|d�}|d|}q|}n�d|kr|jdd�\}}|j|t|t	�}|jd|}	|dt
j||	�}nt
j||j�}|||<|S(NRZi(R2RRktlexistsRR%trsplitt
_normalizeR)R�Rtfspath(
RRktnormedt
ignoremissingtexistststoremapRNRVtfoldedR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
_discoverpath�s '	
cC@sjtj|�}|jjj|d�}|dkrf|rB|}qf|j|||||jj�}n|S(N(RtnormcaseR@tfilefoldmapR}R2R�(RRktisknownR�R�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_normalizefile�s	cC@s�tj|�}|jjj|d�}|dkrN|jjj|d�}n|dkr�|ri|}q�|j|||||jj�}n|S(N(RR�R@R�R}R2t
dirfoldmapR�(RRkR�R�R�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�s	cC@s |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
        (RcR�(RRkR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt	normalizes	cC@s0|jj�d|_|jj�t|_dS(Ni(R@R�R+R5R�R*(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�'s
	
cC@s�|dkr1|}|j}|j�||_n|jdkrO|j|_n|jj|t�x7|D]/}||kr�|j|�qi|j	|�qiWt
|_dS(N(R2R+R�R3RLR@R�RR�R�R�R*(RtparenttallfilestchangedfilestlastnormaltimeRV((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytrebuild-s	

cC@s
|jjS(s�Return identity of dirstate itself to detect changing in storage

        If identity of previous dirstate is equal to this, writing
        changes based on the former dirstate out can keep consistency.
        (R@tidentity(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�@scC@s�|js
dS|j}|r}t|j�}|jj|j|�d|_|jj�|j	d|jf|j
dd�dS|j|ddtdt�}|j
|�dS(NiR#tlocationtplainR�R�R�(R*R/R"RR@tclearambiguoustimesR5R+R�taddfilegeneratort_writedirstateR�(RttrtfilenametnowRj((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�Hs			
cC@s||j|<dS(s%add a callback to be called when the wd parents are changed

        Callback will be called with the following arguments:
            dirstate, (oldp1, oldp2), (newp1, newp2)

        Category is a unique identifier to allow overwriting an old callback
        with a newer callback.
        N(R1(Rtcategorytcallback((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytaddparentchangecallbackds	cC@sg|jdk	ri|j|jkrix9t|jj��D]"\}}|||j|j�q7Wd|_ntj|�tj	t
@}|jjdd�}|dkr>x�|j
j�D]�\}}|ddkr�|d|kr�ddl}|j�}	t|	�t|	�|}
|
|}|j||	�|}Pq�q�Wn|j
j||�d|_t|_dS(Ntdebugsdirstate.delaywriteiR�i(R3R2RLR�R1R�RRRRR�R,t	configintR@ttimetinttsleepR�R+R)R*(RRjtcR�R�t
delaywriteRVteR�tclocktstarttend((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�os&!" 
	cC@sT|dkrtS|j|�r#tSx*tj|�D]}|j|�r3tSq3WtS(Nt.(R)RXR�RR�(RRVR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
_dirignore�scC@s�g}tjj|jd��r:|j|jd��nxf|jjd�D]R\}}|dkst|jd�rM|jtjj|j	t
j|���qMqMW|S(Ns	.hgignoreR9tignoresignore.(RRkR�RtappendR,tconfigitemsRvRR(Rt
expandpath(RRUtnameRk((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRR�s/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����(Ni����RP(tcollectionstdequeRRR4tpopleftRStreadpatternfileR,RQR�t	_patsplitR�RR%R�R2(RRVRUtvisitedtitpatternstpatterntlinenotlinetkindR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_ignorefileandline�s$			c#C@s�d�}|j}|j}|j}tj}tj}tj}	tj}
tj	}|j
}g}
|
j}g}|j}|j�r�|j
r�|j}nd}t|j��}|j�d\}}x�|t|�kr]|t|�kr]||d}|||kr|d7}q�nx0|t|�krO||j|�rO||=q W|d7}q�W|sqd|kr}dg}ntj|�}d|d<x�|D]�}|r�|dkr�||tt�}n|}||kr�q�ny�|||��}||j�}||	krQ||kr+d||<n|r>||�n|||f�nQ||
ksi||krv|||<n,||||��||kr�d||<nWq�tk
r}||kr�d||<q|jj|�r|r�||�n||�q||tj|j��q�Xq�W|j�r{xKt |�D]:}|dks:||kr^q:n||�s:||=q:q:Wn|j�r�|j
r�i}xy|j!�D]k\}}|dkr�q�nt"j#|�}|j$|�}|dkrt%�}|||<n|j&|�q�Wx}|j!�D]l\} }t|�dkrxK|D]@}!|j'|!| td|jj(�}"|!|"krDd||!<qDqDWqqWn||
|fS(	s�Get 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.cS@s�td�}tj|�r*td�}nxtj|�rHtd�}nZtj|�rftd�}n<tj|�r�td�}ntj|�r�td�}ntd�|S(Ntunknownscharacter devicesblock devicetfifotsockett	directorys"unsupported file type (type is %s)(RRtS_ISCHRtS_ISBLKtS_ISFIFOtS_ISSOCKtS_ISDIR(R�R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytbadtype�siRZiR�s.hgN(ii()texplicitdirtbadR@RRfRtS_IFMTtS_IFDIRtS_IFREGtS_IFLNKRR�tisexactRcR�R2R�RUtsortRwRvtdicttfromkeysR)R�R�RiRORt
strtolocaltstrerrortanypatstlistR�RR�R}R4R�R�R�(#RRtsubreposRt	matchedirtbadfntdmapRftgetkindtdirkindtregkindtlnkkindRt	dirsfoundtfoundaddtdirsnotfoundtnotfoundaddR�RURtjtsubpathtresultstfftnfRjRRIRVR�tnctpathstnormRkR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
_walkexplicit�s�
												
'
(







!	

c@s�|rtj�tj}n-|r6�j��j}ntj�tj}�j��j���j�	�j�tj�t	j
}tj�tj
�tj��j�t}}	�j�r�t}tj}n�j�r�t}	n|r
�jr
�j�
�j�t}	n�j�
d��j�|�\�
}
}|	oG|
pF|}	g|
D]}||d�sQ|^qQ}
����������	�
���
�fd�}
x7|
D]/\}}�
p�||k}|
|g|�q�Wx|D]
}�
|=q�W�
d=|	r�|r��
r<�r<g�D]}|^q'}n1g�D]$}|�
krC�|�rC|^qC}|j�|r.tj�jdt�}x�t|�D]�}�r��|tt��
kr�d�
|<q�|j|�ry|�|���
|<Wq'tk
rd�
|<q'Xq�d�
|<q�Wq�t|�}xCtj g|D]}�|�^qJ�D]}|�
t!|�<qcWn�
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()).

        ic@s�|j}x�|r�|j�}�j|�}|s9qn|dksQ|dkrZd}nd}|dkrud}nd}y"��|�dtd|�}Wn\tk
r�}|jtjtjfkr��j	�j
|�tj|j
��qn�nXx�|D]�\}}	}
|r*||kr*qn�rY�|rG|d|pJ|tt�}n|rm|d|pp|}|�
kr|	�kr��|�s��	r��	|�n||�n|�kr��s��|�r�d�
|<q�q�|	�ks�|	�kru|�kr+�s�|�rr|
�
|<qrq��s=�|�r��|�r�|se�
|tt�}n|
�
|<q�q�|�kr��s��|�r�d�
|<q�qqWqWdS(	NtthistallR�RPs.hgRtskipRZ(R�R�tvisitchildrensetR2R�RiRGtEACCESRHRRzRRRR)(tworkt
alreadynormedtwaddtndtvisitentriesR6tentriesRIRVRRjR/(R$R"R�RtlistdirR&Rtmatchalwaystmatchfnt	matchtdirR�t
normalizefileR%R-R(s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyttraverse|s\				"	


s.hgtcachedN("RRTRXR�talwaysRAttraversedirR@R?RRfRRRRRR)RR�tprefixRcR�R�R2R3RRtpathauditorR%R�tcheckRit	statfilestnext(RRRRtignoredtfullt	dirignoreRftexactt	skipstep3R9R)RNRDR<R:R�RVtvisitt
audit_pathR/tivRRj((R$R"R�RR?R&RR@RARBR�RCR%R-Rs8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytwalkAsz													
					)9>

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#|"dkr�||�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
        RNiiiitnmaR�i@i����R�R�R�N(R@tpreloadR�RR�RPR�RaR�R+RGR2RUR�R�R�R�RRR	tstatus(&RRRRMtcleanRtlistignoredt	listcleantlistunknowntlookuptmodifiedtaddedtremovedtdeletedR"t	dcontainstdgettladdtmaddtaaddtuaddtiaddtraddtdaddtcaddtmexactROR`R�R�RNtfnRjttR�R�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRX�st$	
														
	




"




c@s�|j�|j�r�j�S|j�}|j�rZg|D]}|�kr>|^q>S|j�r�t�fd�|D��r�t|�Sg�D]}||�r�|^q�S(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	<genexpr>_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|ddtdt��n|r�|jd|jf|jdd�|j|dd�n|jj	|�t
j|jj|�|jj|�dt�dS(	s&Save current dirstate into backup fileR�R�R�R#R�R�thardlinkN(
RrR*RR�R�R�R�R/tregistertmpt	tryunlinkRtcopyfileR(RR�t
backupnameR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
savebackupks
cC@sp|j�|j|�}|j}tj|j|�|j|��rV|j|�n|j||dt�dS(sRestore dirstate by backup fileR�N(	R�RrRRtsamefileRRtrenameR�(RR�RwR�to((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt
restorebackup�s
	$cC@s|jj|�dS(sClear backup fileN(RR(RR�Rw((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytclearbackup�sN(JRRR=t
contextlibtcontextmanagerR>R?t
propertycacheR@tpropertyRAR
RJRLRORRXR]R_RaRcRRpRtRsR2RzRR�R�R�R�RKR�R�RBRR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R)R�R�R�R�R�R�R�R�R�R�RRRR3R�RURXRqRrRxR|R}(((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR#9s|		
					"									)									
											
			��	`				R6cB@sdeZdZd�Zed��Zed��Zd�Zd�ZeZ	d�Z
d�Zd d�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zed��Zd�Zd�Zed��Zed��Zd�Zd�Zd�Zd�Zd�Z ed��Z!ed��Z"ed��Z#ed��Z$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(R�R@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s	cC@s�|jj�|jj�|jtt�tj|d�tj|d�tj|d�tj|d�tj|d�tj|d�dS(Nt_dirst_alldirsR�R�R�R�(R@R�R�R�RRtclearcachedproperty(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s

cC@s
|jj�S(N(R@R�(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��scC@s
t|j�S(N(RwR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt__len__�scC@s
t|j�S(N(R�R@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��scC@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.pyR��scC@s|j|S(N(R@(RR~((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�scC@s
|jj�S(N(R@Rp(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRp�scC@s|jdS(s5Loads the underlying data, if it's not already loadedN(R@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRW�scC@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?rR�R|R�R�i����i����N(	R�R�taddpathR�t
dirstatetupleR@R�R�R�(RRVR�R�R�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��scC@s�|dkr.d|jkr.|jj|�n|dkr\d|jkr\|jj|�nd|jkr�tj|�}|jj|d�nt
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?rR�R|R�R�R�iN(R�R�tdelpathR�R�RR�R�R�R2R�R@R�R�(RRVR�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�scC@s�|jj|d�dk	}|rt|dkrOd|jkrO|jj|�nd|jkrt|jj|�qtnd|jkr�tj|�}|j	j|d�n|j
j|�|S(sm
        Remove a file from the dirstate.  Returns True if the file was
        previously recorded.
        R�R�R�R�N(R@R�R2R�R�R�R�RR�R�R�R�(RRVR�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�scC@s�x�|D]|}|j|�}|dk	r|ddkr|d|krt|d|d|dd�|j|<|jj|�qqWdS(NiR�iiii����(R}R2R�R@R�R�(RRUR�RVR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�)s

,(cC@s�ytj|j�SWn�tk
r�t�}t�}x}|jj�D]l\}}|ddksr|ddkr�|j|�n|ddkrF|ddkrF|j|�qFqFW||fSXdS(s4Compute the nonnormal dirstate entries from the dmapiR�ii����ii����N(RtnonnormalotherparententriesR@tAttributeErrorR4R�R�(RtnonnormR�RR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pytnonnormalentries0s
		  cC@s�y
tj}Wntk
r nX||jtjtj�Si}tj}x@|jj�D]/\}}|ddkrY||||�<qYqYWd|d<|S(seReturns a dictionary mapping normalized case paths to their
        non-normalized versions.
        iR�R�(	Rtmake_file_foldmapR�R@RtnormcasespectnormcasefallbackR�R�(RtmakefilefoldmapRVR�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�>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|jd�S(NR�(RtdirsR@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�ascC@stj|j�S(N(RR�R@(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR�escC@sqtj|j|j|j�\}}|jdk	rd|j|krd|j�tj	t
d���n||_|S(Ns1working directory state may be changed parallelly(R
t
trypendingR%RR/R�R2RRR�R(RtfpR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt_opendirstatefileis$
	cC@s�|js�y)|j�}|jd�}|j�Wn1tk
re}|jtjkr\�nd}nXt|�}|dkr�|d |dd!f|_q�|dkr�ttf|_q�t	j
td���n|jS(Ni(RPiis(working directory state appears damaged!(R�R�RDRRFRGRHRwRRR�R(RR�RjterrRd((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRKrs 	
cC@s||f|_t|_dS(N(R�R�R�(RR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��scC@s0tjj|jj|j��|_y.|j�}z|j�}Wd|j	�XWn,t
k
r�}|jtjkr|�ndSX|s�dStj
td�r�tjt|�d�|_ntjtj�}||j|j|�}|js�|j|�n|jj|_|jj|_|jj|_dS(Ntdict_new_presizediG(RtfilestattfrompathRRR/R�R�RDRRFRGRHtsafehasattrRR�RwR@tnogctparse_dirstateR�R�R�R�RR}(RR�RjR�R�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyRD�s,		cC@sZ|jtj|j|j|j�|��|j�t|_|j	�\|_
|_dS(N(R�Rt
pack_dirstateR@R�RKRR)R�R�R�R�(RRjR�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s

	cC@s|j�\}}||_|S(N(R�R�(RR�totherparents((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s	cC@s|j�\}}||_|S(N(R�R�(RR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s	cC@s|j|jS(N(R@R�(R((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��scC@s7i}tj}x!|jD]}||||�<qW|S(N(RR�R�(RRVR�R�((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR��s
	N(%RRRR=R�R@R�R�R�R�R�R�R2R}R�RRpRWR�R�R�R�R�R�RMROR�R�R�RKR�RDR�R�R�R�R�(((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyR6�sB 																					5	("t
__future__RR�R~RGRRti18nRtnodeRRPRRRRSRRRR	R
Rt	importmodRR�t	filecacheR�R�R
RR"tobjectR#R6(((s8/usr/lib64/python2.7/site-packages/mercurial/dirstate.pyt<module>s,@					����d