-=[ Mr. Bumblebee ]=-
_Indonesia_

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


l\c@s&ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
eZejjZejjZejZejZejZeZejdZejedZdZdZdZdZd	Zd
Z ddZ"dZ#d
Z$dZ%dZ&dZ'dZ(dZ)dZ*dZ+ej,dkrdZ+nej,dkre-dddgde.Z/dZ+dZ#dZ$ndZ0d Z1d!d"Z2d#Z3d$Z4d%Z5d&Z6d'Z7e8ej9ej:gZ;d(Z<d)Z=dd*Z>dd+Z?d,Z@d-ZAd.ZBd/ZCd0ZDed1ZEddd2ZFd3ZGd4eHfd5YZId6ZJd7ejfd8YZKd9ZLd:ZMdS(;i(t_NicCsk|jdd}t|dkr.d|fS|djd}|rU||dfS|dd|dfS(sSame as posixpath.split, but faster

    >>> import posixpath
    >>> for f in ['/absolute/path/to/file',
    ...           'relative/path/to/file',
    ...           'file_alone',
    ...           'path/to/directory/',
    ...           '/multiple/path//separators',
    ...           '/file_at_root',
    ...           '///multiple_leading_separators_at_root',
    ...           '']:
    ...     assert split(f) == posixpath.split(f), f
    t/iti(trsplittlentrstrip(tpthttnh((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytsplits
cCstS(s@return true if it is safe to hold open file handles to hardlinks(tTrue(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
openhardlinks.scCstj|jS(s-return number of hardlinks for the given file(tostlstattst_nlink(tname((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytnlinks2scCs}|d}tjjdkr?|ddkry|dd!}qyn:|jdry|jdryd|kry|dd!}n|S(	s<parses the output produced by patch and returns the filenameitOpenVMSit`iit't (Rtsystplatformt
startswithtendswith(toutput_linetpf((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytparsepatchoutput6s
*cCsw|rd||fp|}d|d krHtjtd|nt|}|rsdt||f}n|S(sBuild argument list for sshs%s@%st-is4illegal ssh hostname or username starting with -: %ss-p %s %s(terrortAbortRt
shellquote(tsshcmdthosttusertporttargs((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytsshargsAscCstj|jd@dkS(s"check whether a file is executablei@i(RR
tst_mode(tf((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytisexecLscCsmtj|j}|rtj|st|}|j}|jtj|ytj	||Wqt
k
rt|d}|j||jqXndStj|r
tj|}tj|t|d}|j||jdt
@}n|d@}|rE|rEtj|||d@d?t
@Bn$|ri|ritj||d@ndS(Ntwii@i$i(RR
R&tstattS_ISLNKtopentreadtclosetunlinktsymlinktOSErrortwritetreadlinktumasktchmod(R'tltxtstfptdatatsx((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytsetflagsPs4








$
cCsytj|jd@}WnQtk
rm}|jtjkrDn|}|dkr`t}n|dM}nXtj||dS(sCopy the file mode from the file at path src to dst.
    If src doesn't exist, we're using mode instead. If mode is None, we're
    using umask.iiN(	RR
R&R1terrnotENOENTtNoneR4R5(tsrctdsttmodeR&tinst((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytcopymodets
cCsytjtjBtjB}tjd|dd\}}zatj|tj|jd@}||@}tj	|||Atj|jd@|k}Wdtj
|XWnttfk
rt
SX|p|S(s}
    Check whether the given path is on a filesystem with UNIX-like exec flags

    Requires a directory (like /foo/.hg)
    tdirtprefixs
hg-checkexec-iN(R*tS_IXUSRtS_IXGRPtS_IXOTHttempfiletmkstempRR.R&R5R/tIOErrorR1tFalse(tpatht	EXECFLAGStfhtfntmtnew_file_has_exectexec_flags_cannot_flip((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	checkexecs

 cCstjd|dd}yLtjd|dd}tjtjj|j|tj|t	SWnZt
k
rxtStk
r}|dt
jkrtjj|rtj|ntSXdS(s?check whether the given path is on a symlink-capable filesystemRERFs
hg-checklink-iN(RJtmktemptNamedTemporaryFileRR0RNtbasenameRR/R
tAttributeErrorRMR1R=tEIOtexists(RNRtfdRC((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	checklinks

%cCsdS(sCheck that the base-relative path is a valid filename on this platform.
    Returns None if the path is ok, or a UI string describing the problem.N((RN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytcheckosfilenamescCsdS(N((R\((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	setbinaryscCs|S(N((RN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytpconvertscCs|S(N((RN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	localpathscCstjj||S(swReturns whether path1 and path2 refer to the same file. This is only
    guaranteed to work for files, not directories.(RRNtsamefile(tfpath1tfpath2((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRbscCs.tj|}tj|}|j|jkS(syReturns whether fpath1 and fpath2 are on the same device. This is only
    guaranteed to work for files, not directories.(RR
tst_dev(RcRdtst1tst2((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
samedevicescCs
|jS(N(tlower(RN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytnormcasestdarwincCs,y|jd|jSWntk
r.nXy|jd}Wntk
rd}d}d}xc|D][}t|}|r|dks|dkr|djg|D]}dt|^q7}d}d}n|dkr|dkr||7}qk|dkr`d|ko"d	knr`|d
kr<d}n|dkrQd
}nd}|}qk|dkrd|kodknr||7}|d8}|s||7}d}qqk|d|7}qkW|djg|D]}dt|^q7}|jd}nXtjd|jjdS(s
        Normalize a filename for OS X-compatible comparison:
        - escape-encode invalid characters
        - decompose to NFD
        - lowercase

        >>> normcase('UPPER')
        'upper'
        >>> normcase('Café')
        'cafe\xcc\x81'
        >>> normcase('É')
        'e\xcc\x81'
        >>> normcase('ʾ.JPG') # issue3918
        '%b8%ca%c3\xca\xbe%c8.jpg'
        tasciisutf-8Riiis%%%02XiiiiiiitNFD(tdecodeRitUnicodeDecodeErrortordtjointunicodedatat	normalizetencode(RNtuR8tgR6tctoR7((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRjsH



0	
(			(


0tcygwins/usr/bins/usr/libs	/cygdrivetreversecCst|}|dks+|dtjkr8tj|SxgtD]_}|j|sZq?nt|}||krv|S||tjkr?|tj||Sq?Wtj|S(Ni(RRtseptencodingtuppertcygwinmountpointsR(RNtpathlentmptmplen((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRjs

cCstS(N(RM(RN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRU6scCstS(N(RM(RN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyR]<scCs2tjjdkrd|Sd|jddSdS(NRs"%s"s'%s'Rs'\''(RRRtreplace(R8((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyR?scCs|S(N((tcmd((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytquotecommandEstrcCstj||S(N(Rtpopen(tcommandRB((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRHscCsUtjjdkrtSytj|dtSWn tk
rP}|jtjkSXdS(s5return False if pid dead, True if running or not sureRiN(RRRR
tkillR1R=tESRCH(tpidRC((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyttestpidKscCs6|dkr td||fStd||fS(s}return a 2-tuple (desc, code) describing a subprocess status
    (codes from kill are negative - not os.system/wait encoding)isexited with status %dskilled by signal %d(R(tcode((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytexplainexitUscCs|jtjkS(s;Return True if the stat object st is from the current user.(tst_uidRtgetuid(tst((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytisowner\scCstjdkr|Sd}tj|kr5||Stjdkr]|tjjd|SxTtjjddjtj	D]1}|tjj||}|dk	r|SqWdS(sFind executable for command searching like which does.
    If command is a basename then PATH is searched for command.
    PATH isn't searched if command is an absolute or relative path.
    If command isn't found None is returned.RcSs/tjj|r+tj|tjr+|SdS(s'Will return executable if existing fileN(RRNtisfiletaccesstX_OKR?(t
executable((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytfindexistinghs'tplan9s/bintPATHRN(RRRR{RNRqtenvirontgetR	tpathsepR?(RRRNR((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytfindexe`s	
(cCsdS(N((((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytsetsignalhandlerzsccstj}tj}x~|D]v}y.||}||jtkrLd}nWn:tk
r}|jtj	tj
fkrnd}nX|VqWdS(sqStat each file in files. Yield each stat, or None if a file does not
    exist or has a type we don't care about.N(RR
R*tS_IFMTR&t_wantedkindsR?R1R=R>tENOTDIR(tfilesR
tgetkindtnfRterr((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	statfiless		


cCs
tjS(sreturn name of current user(tgetpasstgetuser(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRscCsO|dkrtj}nytj|dSWntk
rJt|SXdS(siReturn the name of the user with the given uid.

    If uid is None, return the name of the current user.iN(R?RRtpwdtgetpwuidtKeyErrortstr(tuid((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytusernames
cCsO|dkrtj}nytj|dSWntk
rJt|SXdS(skReturn the name of the group with the given gid.

    If gid is None, return the name of the current group.iN(R?RtgetgidtgrptgetgrgidRR(tgid((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	groupnames
cCsttj|jS(skReturn the list of members of the group with the given
    name, KeyError if the group does not exist.
    (tlistRtgetgrnamtgr_mem(R((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytgroupmembersscCs*tjtjttddB|d|S(NtP_DETACHi(RtspawnvptP_NOWAITtgetattr(R$((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
spawndetachedscCstjd S(Ni(Rtargv(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytgethgcmdscCs8y ddl}ddl}ddl}xtjtjtjfD]}yy|j}Wntk
row@nXt	j
|sw@nyB|j||jd}|jd|d}|dkr|SWntk
rnXWq@t
k
rq@tk
r}|dtjkrqq@Xq@WWntk
r3nXdS(	NitithiiiPt(ttermiostarraytfcntlRtstderrtstdouttstdintfilenoRYRtisattytioctlt
TIOCGWINSZt
ValueErrorRLR=tEINVALtImportError(RRRtdevR\tarritwidthte((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	termwidths4$



cCstj|dS(N(Rtmkdir(RNt
notindexed((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytmakedirscCszytj|Wn1tk
rD}|o8|jtjksEqEnXytjtjj|Wntk
runXdS(s.unlink and remove the directory if it is emptyN(RR/R1R=R>t
removedirsRNtdirname(R't
ignoremissingR((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
unlinkpaths

cCsdS(N(R?(tkeyRtscope((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	lookupregscCsdS(sHide current shell window.

    Used to hide the window opened when starting asynchronous
    child process under Windows, unneeded on other systems.
    N((((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
hidewindowst	cachestatcBs5eZdZdZejZdZdZRS(cCstj||_dS(N(RR*(tselfRN((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt__init__scCst|jjS(N(tboolR*tst_ino(R((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt	cacheablescCsy|jj|jjko|jj|jjko|jj|jjko|jj|jjko|jj|jjko|jj|jjko|jj|jjko|jj|jjko|jj	|jj	kSWnt
k
rtSXdS(N(R*R&RReRRtst_gidtst_sizetst_mtimetst_ctimeRYRM(Rtother((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt__eq__s
cCs||kS(N((RR((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt__ne__s(t__name__t
__module__RRtobjectt__hash__RR(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRs
				cCsdS(N(R?(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pytexecutablepathstunixdomainservercBseZdZdZRS(cCsgtt|jtj|d}|||_|_tjj|jrtjj	|jr{tj
|j|_qtj|jny|j|jWntj
k
rU}|jddkrOtjdd|}tjj|||_y*|j|jtj|j|jWqRttj
fk
rK|jqRXqVnX|jddS(s2Create a unix domain socket with the given prefix.s.sockisAF_UNIX path too longRFshg-%s-iN(tsuperRRtsockettAF_UNIXtrealpathRNRtislinkR[R3R/tbindRR$RJtmkdtempRqR0R1tcleanuptlisten(RRqt	subsystemtsocknameRttmpdir((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRs*


cCsgd}|tj|j|j|jkrc|tj|j|tjtjj|jndS(NcSs@y||Wn+tk
r;}|jtjkr<q<nXdS(N(R1R=R>(R'RNR((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
okayifmissing.s
(RR/RNRtrmdirR(RR((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyR-s
	(RRRR(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyRs	cCs|otj|jS(s(check whether a stat result is a symlink(R*R+R&(R((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
statislink:scCs|o|jd@dkS(s1check whether a stat result is an executable filei@i(R&(R((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt
statisexec>s(Nti18nRR|RRRR=R*RRRRRJRrR,t	posixfileRNtnormpathtsamestattlinktoslinkR/trenameRMtexpandglobsR4R	RRRR%R(R<R?RDRUR]R^R_R`RaRbRhRjRtsortedR
R~RRRRRRRRtsettS_IFREGtS_IFLNKRRRRRRRRRRRRRRRRRRR(((s3/usr/lib/python2.7/dist-packages/mercurial/posix.pyt<module>sx			
							$									B							
											
		(	

Copyright © 2017 || Recoded By Mr.Bumblebee