\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlZddlZddlZddlZddlm Z m Z dZ e ddZe jseZdZejZe jjdrejZejZejZneZeZejZd ejfd YZd ejfd YZd ejfdYZej ej!j"dde#Z$e%e$ddZ&e&re%edej'e&_(ejej)eejfe&_*n dZ&dZ+dZ,nddl-Z-ej.j/Z0ej1Z2ej3Z4Z5ej6Z7e7dj8Z9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGe4e2e2ej6e2e2e7ge0jH_*e7e0jH_(dZId eJfd!YZdS("i(tabsolute_importNi(tencodingtpycompatcC@stj|rtjStj|r,tjStj|rBtjStj|rXtjStj |rntj Stj |rtj Stj |rtjS|S(N(tstatmodtS_ISREGtS_IFREGtS_ISDIRtS_IFDIRtS_ISLNKtS_IFLNKtS_ISBLKtS_IFBLKtS_ISCHRtS_IFCHRtS_ISFIFOtS_IFIFOtS_ISSOCKtS_IFSOCK(tmode((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt _mode_to_kindscC@sg}|}|jtjs.|tj7}ntj|}|jx|D]}tj||}||krtj|j rgS|r|j |t |j |fqN|j |t |j fqNW|S(slistdir(path, stat=False) -> list_of_tuples Return a sorted list containing information about the entries in the directory. If stat is True, each element is a 3-tuple: (name, type, stat object) Otherwise, each element is a 2-tuple: (name, type) ( tendswithRtosseptostlistdirtsorttlstatRRtst_modetappendR(tpathtstattskiptresulttprefixtnamestfntst((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR&s  " itlinuxt_ioveccB@s&eZdejfdejfgZRS(uiov_baseuiov_len(t__name__t __module__tctypestc_void_ptc_size_tt_fields_(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR%Us t_msghdrcB@s_eZdejfdefdejefdefdejfdefdej fgZ RS(umsg_nameu msg_namelenumsg_iovu msg_iovlenu msg_controlumsg_controllenu msg_flags( R&R'R(R)t _socklen_ttPOINTERR%t _msg_iovlen_tt_msg_controllen_ttc_intR+(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR,[s     t_cmsghdrcB@s?eZdefdejfdejfdejdfgZRS(ucmsg_lenu cmsg_levelu cmsg_typeu cmsg_datai(R&R't _cmsg_len_tR(R1tc_ubyteR+(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR2fs   uct use_errnotrecvmsgt c_ssize_tcC@stddS(Nsunsupported platform(tNotImplementedError(tsockfdtmsgtflags((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt_recvmsgvscC@sA|jtjtkrdStj|jtjt}|jS(N(tmsg_controllenR(tsizeofR2tcastt msg_controlR.tcontents(tmsghtcmsgptr((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt_CMSG_FIRSTHDRysc C@svtjd}ttj|tjtj|}tjd}tddtj |dtj|tjtj|d}t |tj |d}|dkrtj }t |tj|nt|}|sgS|jtjks |jtkrgStj|jtjtj}|jtjjtjtj} gtj| D]} || ^qbS(s+receive list of file descriptors via socketiiiN(R(R4R%R?R)R>tcreate_string_bufferR,tNonetpointerR<tbyreft get_errnotOSErrorRtstrerrorRDt cmsg_leveltsockett SOL_SOCKETt cmsg_typet _SCM_RIGHTSt cmsg_dataR.R1tcmsg_lenR2toffsetRtxrange( R9tdummytiovtcbufRBtrtetcmsgtrfdst rfdscountti((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pytrecvfdss*'     !iiiIi@iii@icC@s8tj}t|jdtj||jfdS(Ns%s: %s(R(tWinErrortIOErrorterrnoRt strfromlocalRK(tnameterr((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt _raiseioerrors t posixfilecB@sJeZdZdddZdZdZdZdZdZRS( ska file object aiming for POSIX-like semantics CPython's open() returns a file that was opened *without* setting the _FILE_SHARE_DELETE flag, which causes rename and unlink to abort. This even happens if any hardlinked copy of the file is in open state. We set _FILE_SHARE_DELETE here, so files opened with posixfile can be renamed and deleted while they are held open. Note that if a file opened with posixfile is unlinked, the file remains but cannot be opened again or be recreated under the same name, until all reading processes have closed the file.RXic C@sd|krt}nt}|dd!}|dkrSd|krS|tO}t}n|tO}ttB}|dkr|t}nM|dkrt}n8|dkrt}|t O}nt dt j |t j||ttBtBd|td}|tkr t|ntj||} | d krCt j|t|ntj| t j ||} tj|d |tj|d | dS( NtbiiRXt+twtasinvalid mode: %siRct_file(t _O_BINARYt_O_TEXTt _O_RDONLYt _GENERIC_READt_O_RDWRt_GENERIC_WRITEt_OPEN_EXISTINGt_CREATE_ALWAYSt _OPEN_ALWAYSt _O_APPENDt ValueErrorRtsysstrt _kernel32t CreateFileAt_FILE_SHARE_READt_FILE_SHARE_WRITEt_FILE_SHARE_DELETERFt_FILE_ATTRIBUTE_NORMALt_INVALID_HANDLE_VALUERetmsvcrttopen_osfhandlet CloseHandleRtfdopentobjectt __setattr__( tselfRcRtbufsizeR;tm0taccesstcreationtfhtfdtf((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt__init__s:                    cC@s|jS(N(Rk(R((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt__iter__scC@st|j|S(N(tgetattrRk(RRc((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt __getattr__scC@s|jj||S(smimics the read-only attributes of Python file objects by raising 'TypeError: readonly attribute' if someone tries: f = posixfile('foo.txt') f.name = 'bla' (RkR(RRctvalue((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyRscC@s|jj|S(N(Rkt __enter__(R((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR s cC@s|jj|||S(N(Rkt__exit__(Rtexc_typet exc_valuetexc_tb((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyRs( R&R't__doc__RRRRRR(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyRfs ,    (Kt __future__RR(t ctypes.utilRRMRRtRRRtFalseRFRt iswindowstopenRfRPtc_uintR-t sysplatformt startswithR*R3R0R/R1t StructureR%R,R2tCDLLtutilt find_librarytTruet_libcRR<tc_longtrestypeR.targtypesRDR^Rtwindlltkernel32Rxtc_ulongt_DWORDtc_char_pt_LPCSTRt_LPSTRR)t_HANDLERR~RzR{R|RsRrRtRoRqR}RnRpRuRmRlRyReR(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pytsp             !