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: //proc/thread-self/root/lib64/python2.7/site-packages/mercurial/url.pyc
�
1�3\c@@sMddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZm
Z
mZmZmZmZddlmZejZejZejZejZdd�Zdefd	��YZd
ejfd��YZd�Zejed
�Zde
j fd��YZd�Z!d�Z"de
j#fd��YZ$de
j fd��YZ%de$fd��YZ&er�de
j fd��YZ'd
e
j(ej)fd��YZ)ndej*fd��YZ*dej+fd��YZ+dej,fd ��YZ-gZ.dddd!de/d"�Z0dd#�Z1d$�Z2dS(%i(tabsolute_importNi(t_(tencodingterrorthttpconnectiont	keepalivetpycompattsslutilturllibcompattutil(t
stringutilcC@sU|jdd�}|jdd�}|jdd�}|rQ|jdd�}n|S(	s1Replace special characters "&", "<" and ">" to HTML-safe sequences.
    If the optional flag quote is true, the quotation mark character (")
    is also translated.

    This is the same as cgi.escape in Python, but always operates on
    bytes, whereas cgi.escape in Python 3 only works on unicodes.
    t&s&amp;t<s&lt;t>s&gt;t"s&quot;(treplace(tstquote((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytescape%stpasswordmgrcB@s5eZd�Zd�Zd�Zd�Zd�ZRS(cC@s||_||_dS(N(tuitpasswddb(tselfRR((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt__init__5s	cC@s|jj||||�S(N(Rtadd_password(Rtrealmturitusertpasswd((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR9sc
C@s�|jj||�}|\}}|rG|rG|j||�||fS|sU|r�tj|j||�}|r�|\}}|jd�|jd�}}|jjd|�q�n|s�|r�tj	t
j|��}	d|	_
|jj�s!tjtd�tjt|	����n|jjtd�tjt|	���|jjtd�t
j|��|r�|jjtd�|�n|jjtd�d	d�}|s�|jj�}q�n|jj||||�|j||�||fS(
Ntusernametpasswords#using auth.%s.* for authentication
s"http authorization required for %ss#http authorization required for %s
s
realm: %s
s	user: %s
suser:tdefault(Rtfind_user_passwordt_writedebugthttpconnectionmodtreadauthforuriRtgettdebugR	turlRtbytesurltNonetquerytinteractiveRtAbortRthidepasswordtbytestwritetprompttgetpassR(
RRtauthuritauthinfoRRtrestgrouptauthtu((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR <s8
	#cC@s@td�}|jj|||r1dt|�p4df�dS(Ns http auth: user %s, password %s
t*snot set(RRR%tlen(RRRtmsg((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR!_scC@s|jjd|�S(N(RR R((RR1((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytfind_stored_passwordcs(t__name__t
__module__RRR R!R:(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR4s
			#	tproxyhandlercB@seZd�Zd�ZRS(cC@s�|jdd�p!tjjd�}|r�|jd�pE|jd�sYd|d}ntj|�}|js�|jdd�|_|jdd�|_nd	d
g}|j	g|j
dd�D]}|j�^q��|j	gtjjdd
�jd�D]$}|j
�r|j
�j�^q�|jdd�rJg|_n	||_t|�}i|d6|d6}|jdtj|��ni}tjj||�||_dS(Nt
http_proxythostshttp:shttps:shttp://t/RRt	localhosts	127.0.0.1tnotno_proxytt,talwaysthttpthttpssproxying through %s
(tconfigRtenvironR$t
startswithR	R&RRtextendt
configlisttlowertsplittstript
configbooltno_listR-R%R,turlreqR=RR(RRtproxyurltproxyRRtptproxies((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRgs2		)	"%	cC@s�tj|�jd�d}xm|jD]b}||kr<dS|jd�rb|j|d�rbdS|jd�r&|j|d�r&dSq&Wtjj	||||�S(Nt:is*.it.i(
RtgethostRORRR(RKtendswithRSR=t
proxy_open(RtreqRUttype_R?te((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR\�s""(R;R<RR\(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR=fs	%c@s�fd�}|S(Nc@sZt|tj�rI|jd�x4tj|�D]}�||�q/Wn
�||�dS(Ni(t
isinstanceR"thttpsendfiletseekR	t
filechunkiter(Rtdatatchunk(torgsend(s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt	_sendfile�s

((RfRg((Rfs3/usr/lib64/python2.7/site-packages/mercurial/url.pyt
_gen_sendfile�s	thttpshandlerRcB@s#eZeejj�Zd�ZRS(cC@sKt|dd�}|r;|jr.|j�nd|_|Stjj|�S(Ntproxyres(tgetattrR(t
will_closetcloseRjRtHTTPConnectiontgetresponse(RRj((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRo�s	
	(R;R<RhRRntsendRo(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�scC@s�t|dd�}|r>|d d	kr5d|}nt}ntj|�}t}|sn|tj|�kr�tj|�}|s�|j	dkr�dj
|j|jp�dg�|_
|jj�|_|jj|jj�dSnd|_
d|_dS(
Nt_tunnel_hostishttp://shttps:/shttps://RHRXt443(shttp://shttps:/(RkR(tTrueRtgetselectortFalset
getfullurlR	R&tschemetjoinR?tporttrealhostporttheaderstcopytupdatetparentt
addheaders(thandlerthR]ttunnel_hostt
new_tunnelR6((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt_generic_start_transaction�s 
	$	c	@setg|jD].}|j�jd�r
||j|f^q
�}|jd|j�x%|j�D]}|jd|�qeW|jd�|j|jd|j	d|j
��xNtr�j�\}}}|t
jkr�Pntt�fd�d��q�W|�_|j��_�jd	krFtt�jjd��tS|d
kr^d�_nB|jd�ryd
�_n'|dkr�d�_nt
j|���jdkr�d�_d�_d�_t
jt���_tSt
j�j��_d�j_�jj d�}|rC|j�dkrCd�_d�_!n	d�_�j"��_�jj d�}|r��jr�yt#|��_Wnt$k
r�d�_q�X�jdkr�d�_q�n	d�_|t
j%ks|t
j&ksd|ko	d	kns�j
dkr)d�_n�jrX�jrX�jdkrXd�_n�|_'tS(Nsproxy-sCONNECT %s HTTP/1.0
s%s: %s
s
tstricttmethodc@s�jj�j�S(N(tfptreadlineRP((R3(s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt<lambda>�RDRDi�sHTTP/1.0i
sHTTP/1.isHTTP/0.9i	iistransfer-encodingtchunkedscontent-lengthidtHEAD((tdictR{RNRKRpRzt	iteritemstresponse_classtsockR�t_methodRst_read_statusthttplibtCONTINUEtlisttitertstatusRPtreasonR�R�tversiontUnknownProtocolR(tlengthR�RltHTTPMessagetstringioR9Rut	getheadert
chunk_leftt_check_closetintt
ValueErrort
NO_CONTENTtNOT_MODIFIEDRj(	RtxtproxyheaderstheaderR�R�R�ttrencR�((R3s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt_generic_proxytunnel�sx1
		 						

	

	thttphandlercB@seZd�Zd�ZRS(cC@s|jt|�S(N(tdo_openR(RR]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt	http_open(scC@s&t|||�tjj|||�S(N(R�RtHTTPHandlert_start_transaction(RR�R]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�+s(R;R<R�R�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�'s	tlogginghttpconnectioncB@s,eZd�Zejdkr*d�ZnRS(cO@s#tjj|||�||_dS(N(RRnRt_create_connection(Rt
createconntargstkwargs((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR0siicC@sD|j|j|jf|j|j�|_|jr@|j�ndS(N(R�R?Ryttimeouttsource_addressR�Rqt_tunnel(R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytconnect7s
	(iii(R;R<Rtsystversion_infoR�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�/s	tlogginghttphandlercB@s,eZdZdd�Zd�Zd�ZRS(s"HTTP handler that logs socket I/O.cC@s8tt|�jd|�||_||_||_dS(NR�(tsuperR�Rt_logfht_lognamet
_observeropts(RtlogfhtnametobserveroptsR�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR@s		cC@s|j|j|�S(N(R�t_makeconnection(RR]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�Jsc@s�fd�}t|||�S(Nc@s1tj||�}tj�j|�j�j�S(N(tsockettcreate_connectionR	tmakeloggingsocketR�R�R�(R�R�R�(R(s3/usr/lib64/python2.7/site-packages/mercurial/url.pytcreateconnectionNs(R�(RR�R�R�((Rs3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�MsN(R;R<t__doc__R(RR�R�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�>s
	thttpsconnectioncB@sVeZejZejZeej	�Z
ejej�Z
dddd�Zd�ZRS(cO@s2tjj|||||�||_||_dS(N(RRnRtkey_filet	cert_file(RR?RyR�R�R�R�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR]s	cC@s�tj|j|jf�|_|j}|jrVt|�|jjdd�d}ntj	|j|j
|jd|jd|�|_tj
|j�dS(NRXiiRtserverhostname(R�R�R?RyR�RzR�trsplitRt
wrapsocketR�R�Rtvalidatesocket(RR?((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�cs		
N(R;R<RtHTTPResponseR�R�t
HTTPS_PORTtdefault_portRhtsafesendRptwrapgetresponseRnRoR(RR�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�Vs		cB@s2eZdd�Zd�Zd�Zdd�ZRS(cC@sNtjj|d|�tjj|�||_t|j|jj�|_dS(NR�(	RtKeepAliveHandlerRRSRiRRthttppasswordmgrdbtpwmgr(RRR�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRps
		cC@s&t|||�tjj|||�S(N(R�RR�R�(RR�R]((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�wscC@s�tj|�}|jj|�\}}tj|j||�}|rq|\}}||_|jjd|�n	d|_|j
|j|�S(Ns#using auth.%s.* for authentication
(RRvR�R:R"R#RR5R%R(R�R�(RR]R&RRR3R4R5((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt
https_open{s		cO@s�d}d}t|�dkr+|d}nt|�dkrJ|d}n|d}|jr�d|jkr�d|jkr�|jd}|jd}nt||||||�}|j|_|S(Niiitkeytcert(R(R8R5R�R(RR?RyR�R�tkeyfiletcertfiletconn((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s


'
	N(R;R<R(RR�R�R�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyRios		thttpdigestauthhandlercB@s#eZd�Zd�Zd�ZRS(cO@s#tjj|||�d|_dS(N(RSR�RR(tretried_req(RR�R�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�scC@sdS(N((R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytreset_retry_count�scC@s@||jk	r$||_d|_ntjj|||||�S(Ni(R�tretriedRSR�thttp_error_auth_reqed(Rtauth_headerR?R]R{((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s
		(R;R<RR�R�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s		thttpbasicauthhandlercB@s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cO@s,d|_tjj|||�d|_dS(N(R(R5RSR�RR�(RR�R�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�s	cC@s&|jr"|j|j|j�n|S(N(R5tadd_unredirected_headerR�(Rtrequest((s3/usr/lib64/python2.7/site-packages/mercurial/url.pythttp_request�s	cC@s&|jr"|j|j|j�n|S(N(R5R�R�(RR�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt
https_request�s	cC@sdS(N((R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��scC@s@||jk	r$||_d|_ntjj|||||�S(Ni(R�R�RSR�R�(RR�R?R]R{((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s
		cC@s�|jj|tj|��\}}|dk	r�dtj|�tj|�f}dtjtj	|�j
��}|j|jd�|kr�dS||_
|j|j|�|jj|�SdSdS(Ns%s:%ssBasic %s(RR RRvR(RR'tstrurltbase64t	b64encodeRPt
get_headerR�R5R�R~topen(RR?R]RRtpwtrawR5((s3/usr/lib64/python2.7/site-packages/mercurial/url.pytretry_http_basic_auth�s	""	(R;R<RR�R�R�R�R�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s					t
cookiehandlercB@s#eZd�Zd�Zd�ZRS(cC@s�d|_|jdd�}|s%dStj|�}y2tjjtj|��}|j	�||_Wn?tjj
k
r�}|jtd�|t
j|�f�nXdS(NR5t
cookiefiles?(error loading cookie file %s: %s; continuing without cookies)
(R(t	cookiejarRIR	t
expandpatht	cookielibtMozillaCookieJarRtfsdecodetloadt	LoadErrortwarnRR
tforcebytestr(RRR�R�R_((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�s		

cC@s |jr|jj|�n|S(N(R�tadd_cookie_header(RR�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s	cC@s |jr|jj|�n|S(N(R�R�(RR�((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s	(R;R<RR�R�(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR��s		RcC@s)|jtdd�}g}|rI|jt|||p9id|��n8|jtd|��tr�|jt|d|��n|jt|��t||j	�}	|dk	r8|\}
}}}
|	j|d�\}}||ks�|
r|	j|
|||
�n|j
d||
r*dt|
�p-df�n|jt|	�t|	�f�|jgtD]}|||	�^qd�|jt|��tj|�}d|_d|_d|_|s�dtj�}dtj|�fg|_ndtj|�fg|_|r%|jjd�n|S(
s@
    construct an opener suitable for urllib2
    authinfo will be added to the password manager

    The opener can be configured to log socket events if the various
    ``logging*`` arguments are specified.

    ``loggingfh`` denotes a file object to log events to.
    ``loggingname`` denotes the name of the to print when logging.
    ``loggingopts`` is a dict of keyword arguments to pass to the constructed
    ``util.socketobserver`` instance.

    ``sendaccept`` allows controlling whether the ``Accept`` request header
    is sent. The header is sent by default.
    RGR�is http auth: user %s, password %s
R7snot sets"mercurial/proto-1.0 (Mercurial %s)s
User-agenttAcceptsapplication/mercurial-0.1N(R�sapplication/mercurial-0.1(t
configwithtfloattappendR�R�t	has_httpsRiR=RR�R(R:RR%R8RLR�R�thandlerfuncsR�RStbuildopenert
requestscounttsentbytescounttreceivedbytescountR	R�RtsysstrR(RR2t	useragentt	loggingfhtloggingnametloggingoptst
sendacceptR�thandlerstpassmgrRturisRRt	savedusert	savedpassR�topenertagent((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�s@	')			cC@s�tj|�}|jr?|jj�|_|j�\}}n=tjtjj|��}dt	j
tj|��}d}t||�jt	j|�|�S(Nsfile://(R	R&RwRNR2tnormpathtostpathtabspathRR'RStpathname2urlR(RR�R�(Rturl_RdR6R2R((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyR�Rs	c@s5|j�d|jf�fd��Y}||_dS(s�Wrap a response object with common error handlers.

    This ensures that any I/O from any consumer raises the appropriate
    error and messaging.
    treaderproxyc@seZd�fd�ZRS(c@s�y�|�SWn�tjk
r�}|jrat|j�}|j|}td�||f}ntd�}tj|dtd���n;tjk
r�}tjtd�|dtd���nXdS(NsBHTTP request error (incomplete response; expected %d bytes got %d)s(HTTP request error (incomplete response)thintsvthis may be an intermittent network failure; if the error persists, consider contacting the network or server operatorsHTTP request error (%s)(	R�tIncompleteReadtexpectedR8tpartialRRtPeerTransportErrort
HTTPException(RtsizeR_tgotttotalR9(torigread(s3/usr/lib64/python2.7/site-packages/mercurial/url.pytreadfs 	
	N(R;R<R(R#((R"(s3/usr/lib64/python2.7/site-packages/mercurial/url.pyResN(R#t	__class__(trespR((R"s3/usr/lib64/python2.7/site-packages/mercurial/url.pytwrapresponse]s	(3t
__future__RR�RR�R�ti18nRRDRRRR"RRRRR	tutilsR
R�R�turlerrRSR(RtobjectRR=RhtsafehasattrR�RnR�R�R�R�R�R�R�R�RiR�R�tbasehandlerR�RRsRR�R&(((s3/usr/lib64/python2.7/site-packages/mercurial/url.pyt<module>
sB:
				22			]"/.	R