HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/posix.pyc
�
1�3\c@@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZmZmZmZejd�ZeZejjZejjZy
ejZWnek
r(d�ZnXejZej Z ej!Z!ej"Z"e#Z$ej%d�Z%ej%e%�d�Z&d	�Z'd
�Z(d�Z)d�Z*d
�Z+d�Z,dd�Z.d�Z/d�Z0d�Z1d�Z2d�Z3d�Z4d�Z5d�Z6d�Z7d�Z8d�Z9ej:j;Z<e9Z=ej>rYd�Z9ej:j;Z<d�Z=nej?dkr�e@ddd gd!eA�ZBd"�Z9ej:jCZ<e9Z=d#�Z/d$�Z0ndaDd%�ZEd&�ZFd'�ZGd(�ZHd)�ZId*�ZJd+�ZKe
jLe
jMhZNd,�ZOd-�ZPdd.�ZQdd/�ZRd0�ZSd1�ZTd2�ZUd3�ZVddd4�ZWd5�ZXd6eYfd7��YZZd8�Z[d9�Z\d:�Z]d;�Z^d<�Z_dS(=i(tabsolute_importNi(t_(tencodingterrortpolicytpycompattosutilcC@s ttjd||f��dS(Ns!hardlinks not supported: %s to %s(tOSErrorterrnotEINVAL(tsrctdst((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytoslink+s	cC@sk|jdd�}t|�dkr.d|fS|djd�}|rU||dfS|dd|dfS(s�Same as posixpath.split, but faster

    >>> import posixpath
    >>> for f in [b'/absolute/path/to/file',
    ...           b'relative/path/to/file',
    ...           b'file_alone',
    ...           b'path/to/directory/',
    ...           b'/multiple/path//separators',
    ...           b'/file_at_root',
    ...           b'///multiple_leading_separators_at_root',
    ...           b'']:
    ...     assert split(f) == posixpath.split(f), f
    t/iti(trsplittlentrstrip(tpthttnh((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytsplit7s
cC@stS(s@return true if it is safe to hold open file handles to hardlinks(tTrue(((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
openhardlinksMscC@stj|�jS(s-return number of hardlinks for the given file(tostlstattst_nlink(tname((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytnlinksQscC@sz|d}tjdkr<|ddkrv|dd!}qvn:|jd�rv|jd�rvd|krv|dd!}n|S(	s<parses the output produced by patch and returns the filenameitOpenVMSit`ii����t't (Rtsysplatformt
startswithtendswith(toutput_linetpf((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytparsepatchoutputUs
*cC@sw|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(RtAbortRt
shellquote(tsshcmdthosttusertporttargs((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytsshargs`scC@stj|�jd@dkS(s"check whether a file is executablei@i(RRtst_mode(tf((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytisexeckscC@s�tj|�}|j}|r�tj|�s�t|d�}|j�}|j�t|�ytj	||�Wq�t
k
r�t|d�}|j|�|j�q�XndStj|�r
tj|�}t|�t|d�}|j|�|j�dt
@}n|d@}|jdkr�t|�t|�kr�t|d��}|j�}WdQXt|�t|d��}|j|�WdQXn|r�|r�tj|||d@d?t
@B�n$|r�|r�tj||d@�ndS(Ntrbtwbi�i@ii$i(RRR0tstattS_ISLNKtopentreadtclosetunlinktsymlinkRtwritetreadlinktumaskRtbooltchmod(R1tltxtsttstfptdatatsx((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytsetflagsosB	







'

$
cC@s�ytj|�jd@}WnQtk
rm}|jtjkrD�n|}|dkr`t}n|dM}nXtj||�dS(s�Copy 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.i�i�N(	RRR0RRtENOENTtNoneR>R@(R
RtmodeR0tinst((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytcopymode�s
cC@s�y�tjtjBtjB}tjj|d�}tjj|d�}tjj|d�}tjj|�s�y@tj|�tjj|�r�t	||�n
t	||�Wq�t
tfk
r�q�Xntjj|�r�tjj|d�}tjj|d�}ytj|�j
}Wn+tk
rG}|jtjkr��q�n�X||@dkr�ytj|�j
}WnPtk
r�}|jtjkr��nt|d�j�tj|�j
}nX||@dkr�tSt|�nt|�|}	n|}	d}tjd|	d	d
�\}
}z�tj|
�tj|�j
}||@dkr�tj||d@|B�tj|�j
|@dkr�|dk	r�tj||�d}ntSnWd|dk	r�t|�nXWnt
tfk
r�tSXdS(
s}
    Check whether the given path is on a filesystem with UNIX-like exec flags

    Requires a directory (like /foo/.hg)
    s.hgtcachetstoretcheckisexectchecknoexecitwtdirtprefixs
hg-checkexec-i�N(R5tS_IXUSRtS_IXGRPtS_IXOTHRtpathtjointexiststmkdirRMtIOErrorRtisdirR0RRIR7R9RR:RJRtmkstempR@trenametFalse(RXt	EXECFLAGStbasedirtcachedirtstoredirRPRQtmtetcheckdirtfhtfn((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	checkexec�sf



	
	c	C@saxZtr\tjj|dd�}tjj|d�}tjj|�rLtStjj|�rg|}n|}d}tjdt	j
|�dd�}t	j|�}y]d}|dkr�t	jd|dd�}tjj
|j�}nbd}y,tjj||�}t|d	�j�Wn-tk
rI}|d
tjkrCtS�nXz�yctj||�|dkryt|�n2ytj||�Wntk
r�t|�nXtSWn.tk
r�}|jtjkr�wn�nXWd|dk	r�|j�nXWqtk
rtStk
rX}|jtjkrTtjj|�rTt|�ntSXqWdS(s?check whether the given path is on a symlink-capable filesystems.hgRNt	checklinkRSRTs
checklink-s
hg-checklink-schecklink-targetRRiN(RRRXRYtislinkR]RJttempfiletmktempRtfsdecodetfsencodet
namedtempfiletbasenameRR7R9R\RtEACCESR`R;R:R_RtEEXISTtAttributeErrortEIORZ(	RXRcRkRgRtfdttargettfullpathRL((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyRk�s`				


$
cC@sdS(s�Check 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(RJ(RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytcheckosfilename?scC@sttdd��|�S(s�Get the filesystem mount point from a directory (best-effort)

    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
    tgetfsmountpointcS@sdS(N(RJ(RB((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt<lambda>IR(tgetattrR(tdirpath((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR{DscC@sttdd��|�S(s�Get the filesystem type name from a directory (best-effort)

    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
    t	getfstypecS@sdS(N(RJ(RB((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR|PR(R}R(R~((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyRKscC@sdS(N((Rw((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	setbinaryRscC@s|S(N((RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytpconvertUscC@s|S(N((RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	localpathXscC@stjj||�S(swReturns whether path1 and path2 refer to the same file. This is only
    guaranteed to work for files, not directories.(RRXtsamefile(tfpath1tfpath2((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR�[scC@s.tj|�}tj|�}|j|jkS(syReturns whether fpath1 and fpath2 are on the same device. This is only
    guaranteed to work for files, not directories.(RRtst_dev(R�R�tst1tst2((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
samedevice`scC@s
|j�S(N(tlower(RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytnormcasehscC@s0ytj|�SWntk
r+t|�SXdS(s�
        Normalize a filename for OS X-compatible comparison:
        - escape-encode invalid characters
        - decompose to NFD
        - lowercase
        - omit ignored characters [200c-200f, 202a-202e, 206a-206f,feff]

        >>> normcase(b'UPPER')
        'upper'
        >>> normcase(b'Caf\xc3\xa9')
        'cafe\xcc\x81'
        >>> normcase(b'\xc3\x89')
        'e\xcc\x81'
        >>> normcase(b'\xb8\xca\xc3\xca\xbe\xc8.JPG') # issue3918
        '%b8%ca%c3\xca\xbe%c8.jpg'
        N(Rt
asciilowertUnicodeDecodeErrortnormcasefallback(RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR�rs
cC@s�y|jd�}Wn�tk
r�d}d}t|�}xy||kr�y&tj||�}|t|�7}Wn6tk
r�dt|||d!�}|d7}nX||7}q>W|jd�}nXtjd|�j	�j
d�}tj|�S(Nsutf-8Ris%%%02XitNFD(tdecodeR�RRtgetutf8chart
ValueErrortordtunicodedatat	normalizeR�tencodethfsignoreclean(RXtuRDtposRAtctenc((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR��s"

!tcygwins/usr/bins/usr/libs	/cygdrivetreversecC@s�t|�}|dks+|dtjkr8tj|�SxgtD]_}|j|�sZq?nt|�}||krv|S||tjkr?|tj||�Sq?Wtj|�S(Ni(RRtossepRtuppertcygwinmountpointsR"(RXtpathlentmptmplen((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR��s

cC@stS(N(R`(RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyRj�scC@stS(N(R`(RX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyRk�scC@sgtjdkrd|Stdkr8tjd�jan|rOt|�rO|Sd|jdd�SdS(NRs"%s"s[^a-zA-Z0-9._/+-]s'%s'Rs'\''(RR!t_needsshellquoteRJtretcompiletsearchtreplace(RD((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR)�scC@stj|dt�S(s7Parse a command string in POSIX shell way (best-effort)tposix(Rt
shlexsplitR(RD((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
shellsplit�scC@s|S(N((tcmd((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytquotecommand�scC@sRtjdkrtSytj|d�tSWn tk
rM}|jtjkSXdS(s5return False if pid dead, True if running or not sureRiN(RR!RRtkillRRtESRCH(tpidRL((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyttestpid�scC@s|jtj�kS(s;Return True if the stat object st is from the current user.(tst_uidRtgetuid(RC((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytisowner�scC@s�tjdkr|Sd�}tj|kr5||�Stjdkr]|tjjd|��SxTtjjdd�j	tj
�D]1}|tjj||��}|dk	r|SqWdS(s�Find 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.RcS@s/tjj|�r+tj|tj�r+|SdS(s'Will return executable if existing fileN(RRXtisfiletaccesstX_OKRJ(t
executable((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytfindexisting�s'tplan9s/bintPATHRN(RR!R�RRXRYRtenvirontgetRt	ospathsepRJ(tcommandR�RXR�((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytfindexe�s	
(cC@sdS(N((((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytsetsignalhandlerscc@s�tj}tj}x~|D]v}y.||�}||j�tkrLd}nWn:tk
r�}|jtj	tj
fkr��nd}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(RRR5tS_IFMTR0t_wantedkindsRJRRRItENOTDIR(tfilesRtgetkindtnfRCterr((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	statfiless		


cC@stjtj��S(sreturn name of current user(RRptgetpasstgetuser(((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR�$scC@sV|dkrtj�}nytjtj|�d�SWntk
rQd|SXdS(siReturn the name of the user with the given uid.

    If uid is None, return the name of the current user.is%dN(RJRR�RRptpwdtgetpwuidtKeyError(tuid((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytusername(s
cC@sO|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(RJRtgetgidtgrptgetgrgidR�tstr(tgid((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	groupname4s
cC@sttj|�j�S(skReturn the list of members of the group with the given
    name, KeyError if the group does not exist.
    (tlistR�tgetgrnamtgr_mem(R((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytgroupmembers@scC@s*tjtjttdd�B|d|�S(NtP_DETACHi(RtspawnvptP_NOWAITR}(R.((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
spawndetachedFscC@stjd S(Ni(tsystargv(((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytgethgcmdJscC@stj|�dS(N(RR[(RXt
notindexed((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytmakedirMscC@sdS(N(RJ(tkeyRtscope((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	lookupregPscC@sdS(s�Hide current shell window.

    Used to hide the window opened when starting asynchronous
    child process under Windows, unneeded on other systems.
    N((((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
hidewindowSst	cachestatcB@s5eZd�Zd�ZejZd�Zd�ZRS(cC@stj|�|_dS(N(RR5(tselfRX((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt__init__\scC@st|jj�S(N(R?R5tst_ino(R�((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt	cacheable_scC@sy�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jj|jjko�|jtj|jtjko�|jtj	|jtj	kSWnt
k
r�tSXdS(N(R5R0R�R�RR�tst_gidtst_sizetST_MTIMEtST_CTIMERuR`(R�tother((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt__eq__ds "
cC@s||kS(N((R�R�((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt__ne__ws(t__name__t
__module__R�R�tobjectt__hash__R�R�(((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyR�[s
				cC@s|otj|j�S(s(check whether a stat result is a symlink(R5R6R0(RC((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
statislinkzscC@s|o|jd@dkS(s1check whether a stat result is an executable filei@i(R0(RC((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt
statisexec~scC@s�ycx\traytj|||�}PWqtjk
r]}|jdtjkrWqn�qXqWWntk
rt��nXtt	t
t|g����S(s�block until something happens on any file descriptor

    This is a generic helper that will check for any activity
    (read, write.  exception) and return the list of touched files.

    In unsupported cases, it will raise a NotImplementedErrori(RtselectRR.RtEINTRR�tNotImplementedErrortsortedR�tsettsum(tfdstresRL((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytpoll�s	

cC@s�tj|tj�}|tjO}tj|tj|�}z`g}xFtr�y'|j�}|sePn|j|�WqFtk
r�PqFXqFWdj	|�SWdtj|tj|�XdS(s$Read all available data from a pipe.RN(
tfcntltF_GETFLRt
O_NONBLOCKtF_SETFLRR8tappendR\RY(tpipetflagstoldflagstchunksRD((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytreadpipe�s
	
	cC@s}tjj|�\}}d}|rItjdtj�}tj|�n|j|�|rytj|�tj	|�ndS(s1Bind the UNIX domain socket to the specified patht.N(
RRXRRJR7tO_DIRECTORYtchdirtbindtfchdirR9(tsockRXtdirnameRrtbakwdfd((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pytbindunixsocket�s

(`t
__future__RRRR�R�RR�R�R�R5R�RmR�ti18nRRRRRRt	importmodRR7t	posixfileRXtnormpathtsamestattlinkRRuR=R:R_t
removedirsR`texpandglobsR>RRRR&R/R2RHRJRMRjRkRzR{RR�R�R�R�R�R�t
normcasespecsR�tnormcasespecR�tisdarwinR!R�RR�R�R�R)R�R�R�R�R�R�tS_IFREGtS_IFLNKR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRR(((s5/usr/lib64/python2.7/site-packages/mercurial/posix.pyt<module>s�"


				
							-	R	B