-=[ Mr. Bumblebee ]=-
_Indonesia_

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


l\c@sddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZej
Z
ejZejZejZejZejZejZejZejZejZejjZejZejZejZdZdddZejje_defdYZ e e
j!e
_"e
_!dZ#d	Z$d
Z%dZ&dZ'dd
Z)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1da2dZ3dZ4ddZ5dZ6dZ7dZ8e9e	j:e	j;gZ<dZ=ddZ>ddZ?dZ@eAd ZBd!ZCd"ZDd#ZEd$ZFd%efd&YZGddd'ZHeIZJd(ZKd)ZLdS(*i(t_NitrcCsPytj|||SWn2tk
rK}t|jd||jfnXdS(Ns%s: %s(tosutilt	posixfiletWindowsErrortIOErrorterrnotstrerror(tnametmodet	bufferingterr((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyRst	winstdoutcBs;eZdZdZdZdZdZdZRS(s3stdout on windows misbehaves if sent through a pipecCs
||_dS(N(tfp(tselfR
((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt__init__)scCst|j|S(N(tgetattrR
(Rtkey((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt__getattr__,scCs)y|jjWntk
r$nXdS(N(R
tcloseR(R((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR/s
cCsy_d}t|}d}d|_x7||kr]||}|jj|||!|}q'WWnDtk
r}|jdkrn|jttjdnXdS(Ni>isBroken pipe(tlent	softspaceR
twriteRRRtEPIPE(Rtstlimittltstarttendtinst((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR5s	

cCs_y|jjSWnGtk
rZ}|jtjkr;n|jttjdnXdS(NsBroken pipe(R
tflushRRtEINVALRR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyRGs
(t__name__t
__module__t__doc__RRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR&s				cCsFytjddkSWn'tk
rAdtjjddkSXdS(s+return true if run on windows 95, 98 or me.iitcommandtcomspectN(tsystgetwindowsversiontAttributeErrortostenvirontget(((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt
_is_win_9xRs
cCstS(N(R,(((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt
openhardlinksYscCs.|d}|ddkr*|dd!}n|S(s<parses the output produced by patch and returns the filenameiit`ii((toutput_linetpf((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytparsepatchoutput\s
cCsd|jkrdpd}|r4d||fp7|}|jdsX|jdrttjtd|nt|}|rd|t||f}n|S(	s$Build argument list for ssh or Plinktplinks-Ps-ps%s@%st-t/s9illegal ssh hostname or username starting with - or /: %ss%s %s %s(tlowert
startswithterrortAbortRt
shellquote(tsshcmdthosttusertporttpflagtargs((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytsshargscs	
cCsdS(N((tfRtx((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytsetflagspscCsdS(N((tsrctdstR	((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytcopymodesscCstS(N(tFalse(tpath((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	checkexecvscCstS(N(RG(RH((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	checklinkyscCsJt|dd}|dk	rF|dkrFtj|tjndS(Ntfilenoi(RtNonetmsvcrttsetmodeR)tO_BINARY(tfdtfno((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	setbinary|scCs|jtjdS(NR4(treplaceR)tsep(RH((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytpconvertscCs|jddS(NR4s\(RS(RH((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	localpathscCsttjj|S(N(RUR)RHtnormpath(RH((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyRWscCs
tj|S(N(tencodingtupper(RH((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytnormcasescCstS(N(RG(ts1ts2((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytsamestatscCs2tdkrtjdandtjd|S(Ns(\\*)("|\\$)s"%s"s\1\1\\\2(t_quotereRLtretcompiletsub(R((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR9scCstjdkrd|dS|S(s4Build a command string suitable for os.popen* calls.iiit"(iii(R&tversion_info(tcmd((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytquotecommandscCs'|dtj7}tjt||S(Ns 2> %s(R)tdevnulltpopenRe(R#R	((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyRgscCstd||fS(Nsexited with status %d(R(tcode((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytexplainexitscCstS(N(tTrue(tst((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytisownerscstjjdd}g|jjtjD]}|^q.tjj|djkrndgnfd}tj|kr||SxTtjjddjtjD]1}|tjj	||}|dk	r|SqW|tjjtjj|S(s*Find executable for command searching like cmd.exe does.
    If command is a basename then PATH is searched for command.
    PATH isn't searched if command is an absolute or relative path.
    An extension from PATHEXT is found and added if not present.
    If command isn't found None is returned.tPATHEXTs.COM;.EXE;.BAT;.CMDiR%cs5x.D]&}||}tjj|r|SqWdS(s:Will append extension (if needed) and return existing fileN(R)RHtexistsRL(tpathcommandtextt
executable(tpathexts(s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytfindexistings


tPATHN(
R)R*R+R5tsplittpathsepRHtsplitextRTtjoinRLt
expandusert
expandvars(R#tpathextRpRsRHRq((Rrs5/usr/lib/python2.7/dist-packages/mercurial/windows.pytfindexes+"
(ccs:i}tj}x$|D]}t|}tjj|\}}|sOd}n|j|d}|dkr!yYtgt	j
|tD]6\}}}	||	jt
krt||	f^q}
WnCtk
r}|jdtjtjtjfkrni}
nX|j||
}n|j|dVqWdS(sStat each file in files. Yield each stat, or None if a file
    does not exist or has a type we don't care about.

    Cluster and cache stat per directory to minimize number of OS stat calls.t.iN(tstattS_IFMTRZR)RHRuR+RLtdictRtlistdirRjtst_modet_wantedkindstOSErrorRtENOENTRtENOTDIRt
setdefault(tfilestdircachetgetkindtnftdirtbasetcachetntkRtdmapR((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	statfiless(	
	4
cCsdS(siReturn the name of the user with the given uid.

    If uid is None, return the name of the current user.N(RL(tuid((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytusernamescCsdS(skReturn the name of the group with the given gid.

    If gid is None, return the name of the current group.N(RL(tgid((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	groupnamescCstj|rdStj|tjj|\}}|sYtjj|\}}nxg|r|ry$tj|r~dStj|Wnttfk
rPnXtjj|\}}q\WdS(sspecial version of os.removedirs that does not remove symlinked
    directories or junction points if they actually contain filesN(RRR)trmdirRHRut
ValueErrorR(Rtheadttail((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt_removedirss
cCstyt|Wn1tk
rA}|o5|jtjksBqBnXyttjj|Wntk
ronXdS(s.unlink and remove the directory if it is emptyN(tunlinkRRRRR)RHtdirname(RAt
ignoremissingte((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt
unlinkpaths

cCs`ytj||WnEtk
r[}|jtjkr>nt|tj||nXdS(s=atomically rename file src to dst, replacing dst if it existsN(R)trenameRRtEEXISTR(RDRER((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR!s
cCstjgtjd S(Ni(R&Rqtargv(((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytgethgcmd+scCs
tdS(N(tKeyError(R((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytgroupmembers.scCstS(N(RG(RA((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pytisexec2st	cachestatcBseZdZdZRS(cCsdS(N((RRH((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR6scCstS(N(RG(R((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	cacheable9s(R R!RR(((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyR5s	cCs|dkr!tjtjf}n!t|ttfsB|f}nx^|D]V}y<tjtj|||d}t	j
|jdSWqItk
rqIXqIWdS(s* Look up a key/value name in the Windows registry.

    valname: value name. If unspecified, the default value for the key
    is used.
    scope: optionally specify scope for registry lookup, this can be
    a sequence of scopes to look up in order. Default (CURRENT_USER,
    LOCAL_MACHINE).
    isUTF-8N(
RLt_winregtHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEt
isinstancetlistttupletQueryValueExtOpenKeyRXttolocaltencodetEnvironmentError(RtvalnametscopeRtval((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt	lookupreg<s	
"
cCstS(s(check whether a stat result is a symlink(RG(Rk((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt
statislinkSscCstS(s1check whether a stat result is an executable file(RG(Rk((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt
statisexecWs(Mti18nRRRXR7RRMR)R_R~R&Rtwin32texecutablepathtgetusert
hidewindowtmakedirtnlinkstoslinkt
samedevicetsamefiletsetsignalhandlert
spawndetachedRHRut	termwidthttestpidRtumaskRR"tobjectRtstdoutt
__stdout__R,R-R1R@RCRLRFRIRJRRRURVRWRZR]R^R9ReRgRiRlR|tsettS_IFREGtS_IFLNKRRRRRRGRRRRRRRRjtexpandglobsRR(((s5/usr/lib/python2.7/dist-packages/mercurial/windows.pyt<module>st$T													*				
																
	
				

Copyright © 2017 || Recoded By Mr.Bumblebee