��c@sddlmZddlmZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZ
ddlZddlZddlZddlZddlZejdkr�dlZnddlZejZejZdd�Zd�Zd�Zd�Zd �Zd
efd��YZ defd
��YZ!defd��YZ"de"fd��YZ#e#Z$defd��YZ%de"e%fd��YZ&e&Z'de"e%fd��YZ(dd�Z)e*de*d�Z+d�Z,da-d�Z.dd�Z/d�Z0dZ1d �Z2d!�Z3gie*d"d#�Z4gie*d"d$�Zd%�Z5d&�Z6giddd'�Z7e*dd(�Z8d)�Z9d*efd+��YZ:d,efd-��YZ;d.efd/��YZ<ej=ed.�rej<Z<nd0�Z>dS(1i�(t_(tnullrevNtntcCs�g}|rnx_|D]T}||kr+qn||}|j�tjkr|j�r|j|�qqWn|r�|jtd�t|��n|jtd��dS(sjReport no changes for push/pull, excluded is None or a list of
nodes excluded from the push/pull.
s0no changes found (ignored %d secret changesets)
sno changes found
N(tphasetphasestsecrettextincttappendtstatusRtlen(tuitrepotexcludedt
secretlisttntctx((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytnochangesfounds
"cCs�|dkr(tjtd�|��nx6dD].}||kr/tjtd �|��q/q/Wy#t|�tjtd
���Wntk
r�nXdS(
Nttipt.tnullsthe name '%s' is reservedt:ts
s
s%r cannot be used in a namescannot use an integer as a name(RRR(Rss
s
(tutiltAbortRtintt
ValueError(Rtlbltkindtc((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
checknewlabel+s
cCs8d|ksd|kr4tjtd�|��ndS(sFCheck that the filename f is an acceptable filename for a tracked files
s
s)'\n' and '\r' disallowed in filenames: %rN(RRR(tf((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
checkfilename9scCs�t|�t|�\}}|s(|r�tj|�}|r�d||f}|retj|��n|jtd�|�q�ndS(sECheck if filename f is portable and warn or abort depending on configs%s: %rswarning: %s
N(RtcheckportabilityalertRtcheckwinfilenameRtwarnR(R
RtabortR"tmsg((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
checkportable>s
cCs�|jddd�}|j�}tj|�}tjdkpH|dk}|pZ|dk}|dkr�|p~|p~|dkr�tjt d�|��n||fS( s_check if the user's config requests nothing, a warning, or abort for
non-portable filenamesR
tportablefilenamesR"RR#tignores,ui.portablefilenames value is invalid ('%s')N(
tconfigtlowerRt parsebooltostnametNoneterrortConfigErrorR(R
tvaltlvaltbvalR#R"((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR Js%tcasecollisionauditorcBseZd�Zd�ZRS(cCs^||_||_dj|j�}ttj|�jd��|_||_ t�|_
dS(NR(t_uit_aborttjoint_maptsettencodingR)tsplitt
_loweredfilest _dirstatet _newfiles(tselfR
R#tdirstatetallfiles((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt__init__Xs ! cCs�tj|�}||jkr�||jkr�||jkr�td�|}|jrgtj|��n|j j
td�|�n|jj|�|jj|�dS(Ns&possible case-folding collision for %sswarning: %s
(R9R)R;R<R=RR5RRR4R"tadd(R>RtflR$((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt__call__cs (t__name__t
__module__RARD(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR3Ws tpathauditorcBs,eZdZdd�Zd�Zd�ZRS(s�ensure that a filesystem path contains no banned components.
the following properties of a path are checked:
- ends with a directory separator
- under top-level .hg
- starts at the root of a windows drive
- contains ".."
- traverses a symlink (e.g. a/symlink_here/b)
- inside a nested repository (a callback can be used to approve
some nested repositories, e.g., subrepositories)
cCskt�|_t�|_||_||_tjj|�r[tj |�r[tj
|_
nd�|_
dS(NcSs|S(N((tx((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt<lambda>�s(R8tauditedt
auditeddirtroottcallbackR+tpathtlexistsRt checkcasetnormcase(R>RLRM((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRA{s "cCs<tj|�}|j|�}||jkr1dStj|�r\tjtd�|��ntj|�}tj j
|�ds�|dj�dks�tj|kr�tjtd�|��nd|j�kr^g|D]}|j�^q�}xhdD]]}||dkr�j
|�}tj j|| �}tjtd �||f��q�Wntj|�}t|�t|�ks�t�|j�|j�g} xp|rtjj|�}
tjj|�}||jkr�ntj j|j|
�}ytj|�}
Wn:tk
rL}|jtjtjtjfkr�q�Xtj|
j�r�tjtd
�||
f��nrtj|
j�r�j jtj j|d��r�j s�|j |�r�jtd �||
f��q�| j!|�|j�|j�q�W|jj"|�|jj#| �dS(
sPCheck the relative path.
path may contain a pattern (e.g. foodir/**.txt)Ns$path ends in directory separator: %sis.hgs.hg.ts#path contains illegal component: %sis"path '%s' is inside nested repo %rs"path %r traverses symbolic link %r(s.hgs.hg.RR(s.hgs.hg.($Rt localpathRQRJtendswithsepRRt splitpathR+RNt
splitdriveR)tpardirtindexR6R tAssertionErrortpoptsepRKRLtlstattOSErrorterrnotENOENTtENOTDIRtEINVALtstattS_ISLNKtst_modetS_ISDIRtisdirRMRRBtupdate(R>RNtnormpathtpartstptlpartstpostbaset normpartstprefixestprefixt
normprefixtcurpathtstterr((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRD�sb
!
!
cCs4y||�tSWnttjfk
r/tSXdS(N(tTrueR]RRtFalse(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytcheck�s
N(RERFt__doc__R-RARDRw(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRGns
@tabstractvfscBs�eZdZd�Zd�Zd�Zd�Zd�Zdd�Z dd�Z
dd�Zded �Z
ddd
�Zdd�Zdddd�Zd
�Zd�Zd�Zdd�ZRS(s+Abstract base class; cannot be instantiatedcOs tdtt|����dS(s7Prevent instantiation; don't call this from subclasses.sattempted instantiating N(tNotImplementedErrortstrttype(R>targstkwargs((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRA�scCsCy|j|�SWn+tk
r>}|jtjkr?�q?nXdS(s3gracefully return an empty string for missing filesRR(treadtIOErrorR^R_(R>RNtinst((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyttryread�s
cCs/||d�}z|j�SWd|j�XdS(Ntrb(Rtclose(R>RNtfp((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�scCs2||d�}z|j|�SWd|j�XdS(Ntwb(twriteR�(R>RNtdataR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCs2||d�}z|j|�SWd|j�XdS(Ntab(R�R�(R>RNR�R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�scCstjj|j|��S(N(R+RNtexistsR6(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCstjj|j|��S(N(R+RNRfR6(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRf�scCstjj|j|��S(N(R+RNtislinkR6(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCstj|j|�|�S(N(RtmakedirR6(R>RNt
notindexed((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCstj|j|�|�S(N(RtmakedirsR6(R>RNtmode((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCstj|j|��S(N(R+tmkdirR6(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�scCstj|j|�||�S(N(tosutiltlistdirR6(R>RNRbtskip((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytreaddirscCs"tj|j|�|j|��S(N(RtrenameR6(R>tsrctdst((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�scCstj|j|��S(N(R+treadlinkR6(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR� scCstj|j|�||�S(N(RtsetflagsR6(R>RNtlRH((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�scCstj|j|��S(N(R+RbR6(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRbsN(RERFRxRAR�RR�RR-R�RfR�RuR�R�R�R�R�R�R�Rb(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRy�s" tvfscBs�eZdZeeed�Zd�Zd�Zeee�Z e
jd��Ze
jd��Z
d�Zdeed�Zd �Zd
�ZRS(s�Operate files relative to a base directory
This class is used to hide the details of COW semantics and
remote file access from higher level code.
cCs_|rtj|�}n|r3tjj|�}n||_|j|�d|_d|_ dS(N(
Rt
expandpathR+RNtrealpathRmt
_setmustauditR-t
createmodet_trustnlink(R>RmtauditR�R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRAs
cCs|jS(N(t_audit(R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
_getmustaudit"scCs4||_|r$t|j�|_ntj|_dS(N(R�RGRmR�Rtalways(R>tonoff((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�%s cCstj|j�S(N(Rt checklinkRm(R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt_cansymlink.scCstj|j�S(N(Rt checkexecRm(R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt_chmod2scCs8|jdks|jrdStj||jd@�dS(Ni�(R�R-R�R+tchmod(R>R,((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt_fixfilemode6strc
Cs.|jr=tj|�}|r=tjd||f��q=n|j|�|j|�}|ryd|kry|d7}nd}|d
kr�j|�\}} | r�r�tj||j�tj |||j�Sycd|kr�j
|�d}n=tj|�}
tj|�}|dkr-d }n|
j
�WnJttfk
r�}|jtjkrh�nd}tj||j�nX|dkr�jdkr�|dkp�tj|�|_n|dks�|jr�jtj|�|�q�q�tj||�}|dkr*|j|�n|S(Ns%s: %rtbi�R�R�twiii(R�srb(R�RtcheckosfilenameRR�R6R:t
ensuredirsR�tatomictempfiletunlinkt posixfiletnlinksR�R]R�R^R_R�R-t
checknlinkR�t
mktempcopyR�(
R>RNR�ttextt
atomictempR�RtnlinktdirnametbasenametfdteR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRD;sL
!%cCs�|j|�|j|�}ytj|�Wntk
r@nXtjtjj|�|j �|j
r�ytj||�Wq�tk
r�}t|jt
d�||jf|��q�Xn|j||�dS(Nscould not symlink to %r: %s(R�R6R+R�R]RR�RNR�R�R�tsymlinkR^RtstrerrorR�(R>R�R�tlinknameRt((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�js
cCs'|rtjj|j|�S|jSdS(N(R+RNR6Rm(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR6}s(RERFRxRuRvRAR�R�tpropertyt mustauditRt
propertycacheR�R�R�RDR�R6(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�s
/ tauditvfscBs2eZd�Zd�Zd�Zeee�ZRS(cCs
||_dS(N(R�(R>R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRA�scCs
|jjS(N(R�R�(R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCs||j_dS(N(R�R�(R>R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��s(RERFRAR�R�R�R�(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��s t filtervfscBs)eZdZd�Zd�Zd�ZRS(s4Wrapper vfs for filtering filenames with a function.cCstj||�||_dS(N(R�RAt_filter(R>R�tfilter((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRA�scOs|j|j|�||�S(N(R�R�(R>RNR}R~((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRD�scCs3|r|jj|j|��S|jj|�SdS(N(R�R6R�(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR6�s(RERFRxRARDR6(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��s treadonlyvfscBs#eZdZd�Zdd�ZRS(s#Wrapper vfs preventing any writing.cCstj||�dS(N(R�RA(R>R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRA�sR�cOs4|dkrtjd��n|j||||�S(NR�R�sthis vfs is read only(R�srb(RRR�(R>RNR�R}tkw((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRD�s(RERFRxRARD(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��s c
Cs�tj|�r|}n
|tj}|}tjj|�sXtjj|||�}ntjj|�}|dkr�t |�}n||kr�|j
|�r�|t|�}||�tj|�S||kr�dSg}x�t
r�ytj||�}Wntk
rt}nX|rY|s&dS|j�tjj|�}||�tj|�Stj|�\}} |j| �||kr�Pn|}q�tjtd�||f��dS(s7return the canonical path of myname, given cwd and rootRRs%s not under root '%s'N(RRTR+R[RNtisabsR6RhR-RGt
startswithR tpconvertRutsamefileR]RvtreverseR:RRR(
RLtcwdtmynametauditortrootsepR,treltsR�R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt canonpath�sD
c#s��fd�}ttjdd��|rH�dk rH�fd�}nt}|dkrv|rvg}||��nx:tj�dtd|�D]\}}}|j�d|kr|Vtjj|dd�} tjj tjj| d��r�Vn|r|j
d�q�g|(q�|r�g}
xy|D]q}tjj||�}|||�r0tjj|�r�x/t|t|�D]}
|
VqWq�|
j
|�q0q0W|
|(q�q�WdS( s�yield every hg repository under path, always recursively.
The recurse flag will only control recursion into repo working dirscs|j�kr|�ndS(N(tfilename(Rt(RN(s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
errhandler�stsamestatcsZt}tj|�}x'|D]}�||�rt}PqqW|sU|j|�n|S(N(RvR+RbRuR(tdirlstR�tmatchtdirstatt
lstdirstat(R�(s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytadddir�s
ttopdowntonerrors.hgtpatchesN(tgetattrR+RNR-RvtwalkRutsortR6RftremoveR�t walkreposR(RNt followsymt seen_dirstrecurseR�R�RLtdirstfilestqroottnewdirstdtfnamethgname((RNR�s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��s8+
!
cCsBt�}|jt��g|D]}tjj|�^q }|S(s+return default os-specific hgrc search path(tsystemrcpathtextendt
userrcpathR+RNRh(RNR((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytosrcpath
s %cCs�tdkr�dtjkr�gax�tjdjtj�D]�}|sMq;ntj|�}tjj |�r�x[t
j|�D]:\}}|jd�r~tj
tjj||��q~q~Wq;tj
|�q;Wq�t�antS(sreturn hgrc search path. if env var HGRCPATH is set, use it.
for each item in path, if directory, use files ending in .rc,
else use item.
make HGRCPATH empty to only look in .hg/hgrc of current repo.
if no HGRCPATH, use default os-specific path.tHGRCPATHs.rcN(t_rcpathR-R+tenvironR:tpathsepRR�RNRfR�R�tendswithRR6R�(RjRR((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytrcpaths &RcCsV|s||St||g�}t|�dkrJtjtd���n||dS(Nisempty revision seti�(trevrangeR RRR(RtrevspectdefaultR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt revsingle.scCs�|s|jj�dfSt||�}t|�dkrk|rXtjtd���n|jj�dfSt|�dkr�t|�dkr�t|dkr�|j |d�dfS|j |d�|j |d�fS(Nisempty revision rangeii�(
R?tp1R-R�R RRRt_revrangeseptlookup(RtrevsR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytrevpair7s4Rc
CsOd�}t�g}}x/|D]'}|rB|rBt|�}ny�t|t�rt|j|�|j|�w nt|krv|jtd�\}}|||d�}|||t|�d�}|tkr�dkr�}n|j j
||�}|r|rt|�}w nt|�} |rK| j|�|j
| �n| }|jt| d||k��w nV|r�||kr�|||d�}
|
|kr�w n|j|
�|j|
�w nWntjk
r�nXtj|j|�}g||t|��D]}||kr|^q}
|j|
�|j
|
�q W|S(sAYield revision as strings from a list of revision specifications.cSs1|r#|dkr#|dk r#|S||j�S(Ni(R-trev(RR0tdefval((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytrevfixLsiiR�N(R8t
isinstanceRRBRR�R:R Rt changelogRtlisttdifference_updateRgR�tsortedR-R.tRepoLookupErrortrevsetR�R
(RRRtseenR�tspectstarttendt rangeitertnewrevsRtmR�tdl((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR�IsR
4
cCs�tjst|�Sg}x�|D]�}tj|d�\}}|dkr�ytj|�}Wntjk
r||g}nX|r�|j |�q q�n|j
|�q W|S(N(RtexpandglobsRtmatchmodt _patsplitR-tglobtreR.R�R(tpatstretRjRR,tglobbed((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
expandpats�s
trelpathcs�|dkrg}n|r=|dkr=t|p4g�}n�j||jd�|jd�|����fd�}|�_�|fS(NRRRtincludetexcludecs*�jjjd�j|�|f�dS(Ns%s: %s
(t_repoR
R"R�(RR$(RR(s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytbadfn�s(RR(RR�tgettbad(RRtoptsRR�R"((RRs5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytmatchandpats�s ! cCst|||||�dS(Ni(R&(RRR%RR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��scCstj|j|j��S(N(RR�RLtgetcwd(R((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytmatchall�scCstj|j|j�|�S(N(RtexactRLR'(RR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
matchfiles�sc
s�|dkr|jd�}n|dkrHt|jd�p?d�}nggggf\}}}}t|j�} t|d||�}
g��fd�|
_|d}|j}|j|
t |j
�tt�}
x�|
j
�D]�\}}||}|dkr%| j|�r%|j|�q�dkrH|rH|j|�q�dkrd|j|�q�dkr�j|�q��t|�}|j�}|j|�x�t |�D]�}|jjs�|
j|�r�|
j|�}||krtd�|r|p|}ntd �|r'|p*|}|jj|�q�q�Wi}|dkrx�tj||||||�D]�\}}}|jjs�|
j|�s�|
j|�r�jjtd
�|
j|�|
j|�|df�n|||<qxWn|sx|d}|j�}zK|j|�|j|�x*|j
�D]\}}|j||�qFWWd|j�Xnx$�D]}||
j�krdSqWdS(
Ntdry_runt
similarityics
�j|�S(N(R(RHty(trejected(s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRI�st?R�tas
adding %s
sremoving %s
s7recording removal of %s as rename to %s (%d%% similar)
idi( R-R#tfloatRGRLR�R$R?R�R
tsubstateRuRvt iteritemsRwRR8tcopyRgR
tverboseR)R�RRtsimilartfindrenamestwlocktforgetRBtreleaseR�(RRR%R+R,taddedtunknowntdeletedtremovedt
audit_pathRRR?twalkresultstabsRstdstatet
unknownsetttoprintR�RtcopiestoldtnewtscoretwctxR8R((R.s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt addremove�sj
!
$,*
cCs|jj|�p|}||krT|j|dkr�r�jj|�q�|j|dkr�|kr�js�|jtd�|j||�|j||�f�n|j|dkr�r�j|g�q�|s�j||�ndS(s�Update the dirstate to reflect the intent of copying src to dst. For
different reasons it might not end with dst being marked as copied from src.
tmnR0sF%s has not been committed yet, so no copy data will be stored for %s.
s?rN( R?tcopiedtnormallookuptquietR"RtpathtoRBR4(R
RRIR�R�tdryrunR�torigsrc((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytdirstatecopy�s )cCs�t|jd�j��}g}xZ|D]R}||kr(|sR|dj�rjtjtd���n|j|�q(q(W|j�|r�tjtd�dj |���n|S(shReads and parses .hg/requires and checks if all entries found
are in the list of supported features.trequiresis.hg/requires file is corruptsEunknown repository format: requires features '%s' (upgrade Mercurial)s', '(
R8Rt
splitlinestisalnumR.tRequirementErrorRRR�R6(topenert supportedtrequirementstmissingsR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytreadrequires�s
tfilecacheentrycBs>eZed�Zd�Zd�Zd�Zed��ZRS(cCsd||_d|_d|_|r`tj|j�|_|jrT|jj�|_q`d|_ndS(N(RNR-t cachestatt
_cacheableR\Rbt cacheable(R>RNRb((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRAs cCs(|j�r$tj|j�|_ndS(N(R_R\RbRNR](R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytrefreshscCs|jdk r|jStS(N(R^R-Ru(R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR_"scCsz|j�stStj|j�}|rV|jdkrV|j�|_|jsVtSn|j|krr||_tStSdS(N( R_RuR\RbRNR^R-R]Rv(R>tnewstat((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytchanged)s cCsCytj|�SWn+tk
r>}|jtjkr?�q?nXdS(N(RR]R]R^R_(RNR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRb>s
( RERFRuRAR`R_RbtstaticmethodRb(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR\s
t filecachecBsGeZdZd�Zd�Zd�Zdd�Zd�Zd�Z RS(s?A property like decorator that tracks a file under .hg/ for updates.
Records stat info when called in _filecache.
On subsequent calls, compares old stat info with new info, and recreates
the object when needed, updating the new stat info in _filecache.
Mercurial either atomic renames or appends for files under .hg,
so to ensure the cache is reliable we need the filesystem to be able
to tell us if a file has been replaced. If it can't, we fallback to
recreating the object on every call (essentially the same behaviour as
propertycache).cCs
||_dS(N(RN(R>RN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRASscCs
|j|�S(sUsed to compute the runtime path of the cached file.
Users should subclass filecache and provide their own version of this
function to call the appropriate join function on 'obj' (an instance
of the class that its member function was decorated).
(R6(R>tobjR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR6VscCs||_|j|_|S(N(tfuncRER,(R>Rf((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRD_s cCs�|j|jkrA|j|jks3t|j��|j|jS|jj|j�}|r�|j�r�|j|�|_q�nC|j||j �}t
|�}|j|�|_||j|j<|j|j|j<|jS(N(R,t__dict__t
_filecacheRYR#RbRfReR6RNR\(R>ReR|tentryRN((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt__get__ds!cCsp|j|jkrCt|j||j�t�}||j|j<n|j|j}||_||j|j<dS(N(R,RhR\R6RNRvReRg(R>Retvaluetce((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt__set__|s cCs8y|j|j=Wn tk
r3t|j��nXdS(N(RgR,tKeyErrortAttributeError(R>Re((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt
__delete__�s
N(
RERFRxRAR6RDR-RjRmRp(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRdFs R�cBs>eZdZdd�Zd�Zd�Zd�Zd�ZRS(s9a multiset of directory names from a dirstate or manifestcCs�i|_|j}tj|d�rm|dk rmxU|j�D])\}}|d|kr=||�q=q=Wnx|D]}||�qtWdS(NR3i(t_dirstaddpathRtsafehasattrR-R3(R>tmapR�RrRR�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRA�s
cCsN|j}x>t|�D]0}||kr<||cd7<dSd||<qWdS(Ni(Rqtfinddirs(R>RNR�Rm((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRr�s cCsO|j}x?t|�D]1}||dkr@||cd8<dS||=qWdS(Ni(RqRu(R>RNR�Rm((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pytdelpath�s cCs
|jj�S(N(Rqtiterkeys(R>((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt__iter__�scCs
||jkS(N(Rq(R>R�((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt__contains__�sN( RERFRxR-RARrRvRxRy(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyR��s ccsD|jd�}x.|dkr?|| V|jdd|�}qWdS(Nt/i�i(trfind(RNRl((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyRu�s (?ti18nRtmercurial.nodeRRR.R�RR6R9RtparsersR�RR+R^RRbRR,t
scmwindowstscmplatformtscmposixR�R�R-RRRR%R tobjectR3RGRyR�RWR�R�tfilteropenerR�R�RvR�R�R�R�R�RR�R�RR&R(R*RJRRR[R\RdR�RsRu(((s5/sys/lib/python2.7/site-packages/mercurial/scmutil.pyt<module>s\`<
^Fq.0 :
A 7H$
|