-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
làÁ\c@s„ddlZddlZddlZddlZddlZddlmZd„Zdefd„ƒYZ	dd„Zd„ZdS(iÿÿÿÿN(t_cCstj|jƒƒS(N(tencodingthfsignorecleantlower(ts((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyt_lowercleanstpathauditorcBs/eZdZded„Zd„Zd„ZRS(srensure 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)

    If 'cached' is set to True, audited paths and sub-directories are cached.
    Be careful to not keep the cache of unmanaged directories for long because
    audited paths may be replaced with symlinks.
    cCsttƒ|_tƒ|_||_||_||_tjj|ƒrdt	j
|ƒrdt	j|_nd„|_dS(NcSs|S(N((tx((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyt<lambda>$s(tsettauditedt
auditeddirtroott_cachedtcallbacktostpathtlexiststutilt	checkcasetnormcase(tselfRRtcached((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyt__init__s			"cCsÀtj|ƒ}|j|ƒ}||jkr1dStj|ƒr\tjtdƒ|ƒ‚ntj|ƒ}tj	j
|ƒds¦t|dƒdks¦tj|krÂtjtdƒ|ƒ‚nxo|D]g}d|krÉ|j
dd	ƒ\}}|jƒr0|jƒdkr0tjtdƒ|ƒ‚q0qÉqÉWdt|ƒkrÖg|D]}t|jƒƒ^qM}xhdD]]}||d	krr|j|ƒ}tj	j|| Œ}	tjtdƒ||	fƒ‚qrqrWntj|ƒ}
t|ƒt|
ƒkst‚|jƒ|
jƒg}xp|rtjj|ƒ}tjj|
ƒ}
|
|jkr]Pntj	j|j|ƒ}ytj|ƒ}Wn:tk
rÄ}|jtjtjtjfkrk‚qkn§Xtj |j!ƒrùtjtd
ƒ||fƒ‚nrtj"|j!ƒrktj	j#tj	j|dƒƒrk|j$sF|j$|ƒrktjtdƒ||fƒ‚qkn|j%|
ƒ|jƒ|
jƒq W|j&r¼|jj'|ƒ|jj(|ƒndS(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: %st~itHGtHG8B6Cs"path '%s' is inside nested repo %rs"path %r traverses symbolic link %r(s.hgs.hg.R(RR(s.hgs.hg.()Rt	localpathRR
tendswithseptAbortRt	splitpathRRt
splitdriveRtpardirtsplittisdigittupperRtindextjointlentAssertionErrortpoptsepRRtlstattOSErrorterrnotENOENTtENOTDIRtEINVALtstattS_ISLNKtst_modetS_ISDIRtisdirRtappendR
taddtupdate(RRtnormpathtpartstptfirsttlasttlpartstpostbaset	normpartstprefixestprefixt
normprefixtcurpathtstterr((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyt__call__&sp
%


	!
	!

	cCs4y||ƒtSWnttjfk
r/tSXdS(N(tTrueR,RRtFalse(RR((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pytcheckns

N(t__name__t
__module__t__doc__tNoneRJRRHRK(((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyR
s	Hc
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àWtjtdƒ||fƒ‚dS(s7return the canonical path of myname, given cwd and rootRs%s not under root '%s'N(RRRR*RtisabsR&R9RORt
startswithR'tpconvertRItsamefileR,RJtreverseR"R6RR(
RtcwdtmynametauditortrootseptnametrelRtdirnametbasename((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyt	canonpathusD	


	






cCsFtjj|ƒ\}}t|ƒttjƒkr>|tjS|SdS(sØnormalize the specified path as path prefix

    Returned vaule can be used safely for "p.startswith(prefix)",
    "p[len(prefix):]", and so on.

    For efficiency, this expects "path" argument to be already
    normalized by "os.path.normpath", "os.path.realpath", and so on.

    See also issue3033 for detail about need of this function.

    >>> normasprefix('/foo/bar').replace(os.sep, '/')
    '/foo/bar/'
    >>> normasprefix('/').replace(os.sep, '/')
    '/'
    N(RRR R'R*(RtdR;((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pytnormasprefix£s(
RR-R1RRti18nRRtobjectRROR]R_(((s6/usr/lib/python2.7/dist-packages/mercurial/pathutil.pyt<module>s$	k.

Copyright © 2017 || Recoded By Mr.Bumblebee