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/hook.pyo
�
1�3\c@@s�ddlmZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZddl
mZmZd�Zd�Ze�Zd	�Zed
�Zead�Zd�Zed
�Zed�ZdS(i(tabsolute_importNi(t_(tdemandimporttencodingterrort
extensionstpycompattutil(tprocutilt
stringutilc
C@s%t|�r2|}tj|jd|j�}nk|jd�}|dkrotjtd�||f��n|| }	t	j
}
tj�r�t
j
j|	�\}}|r�|r�t	j
|gt	_
|}	q�ntj��"yttj|	��}Wnttfk
r�t	j�}
ytdtj|	��}Wq�ttfk
r�t	j�}|jrx|jtd��n|j|
�|jr�|jtd��n|j|�|js�td�}nd
}tjtd�||	fd	|��q�XnXWd
QX|
t	_
y1x*|jd�dD]}t||�}q"WWn0tk
rntjtd�||f��nXt|�s�tjtd
�||f��n|jtd�||f�tj�}z�y+|d|d|d|tj|��}Wn�t k
r�}t!|tj"�r?|jtd�||j#df�n,|jtd�|t$j%t&|��f�|rw�n|js�|jtd��n|j�t't'fSXWd
tj�|}|j(dd|||�X|r|rtj)td�|��n|jtd�|�n|t*fS(s�call python hook. hook is callable object, looked up as
    name in python module. if callable returns "true", hook
    fails, else passes. if hook raises exception, treated as
    hook failure. exception propagates if throw is "true".

    reason for "true" meaning "hook failed" is so that
    unmodified commands (e.g. mercurial.commands.update) can
    be run as hooks without wrappers to convert return values.t.i����s(%s hook is invalid: "%s" not in a moduleshgext_%ss,exception from first failed import attempt:
s-exception from second failed import attempt:
s$run with --traceback for stack traces)%s hook is invalid: import of "%s" failedthintNis'%s hook is invalid: "%s" is not defineds(%s hook is invalid: "%s" is not callablescalling hook %s: %s
tuitrepothooktypeserror: %s hook failed: %s
is'error: %s hook raised an exception: %s
s'(run with --traceback for stack trace)
t
pythonhooks,pythonhook-%s: %s finished in %0.2f seconds
s%s hook failedswarning: %s hook failed
(+tcallableRtsysbytest
__module__t__name__trfindRt
HookLoadErrorRtsystpathRt
mainfrozentostsplitRtdeactivatedt
__import__tsysstrtImportErrortSyntaxErrortexc_infot
tracebackflagtwarnt	tracebacktNonetgetattrtAttributeErrortnoteRttimert	strkwargst	Exceptiont
isinstancetAborttargsRt
strtolocaltstrtTruetlogt	HookAborttFalse(RR
thtypethnametfuncnameR-tthrowtobjtdtmodnametoldpathstmodpathtmodfilete1te2t
tracebackhinttpt	starttimetrtexctduration((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyRs�
 	
	
	
	
		$	
		+	
c	C@s*tj�}i}|dk	r_|j�}	|jj|	�|	r_|	j�r_|j|d<q_n||d<||d<xm|j�D]_\}
}t	|�r�|�}nt
|ttf�r�t
j|�}n||d|
j�<q�W|jdd|t�r=|}tj||�}||kr=|jtd�|�q=n|jtd�||f�|rl|j}
ntj�}
|j|d	|d
|
dd|f�}tj�|}|jd
d|||�|r&tj|�}|rtjtd�||f��n|jtd�||f�n|S(Nt
HG_PENDINGtHG_HOOKTYPEtHG_HOOKNAMEtHG_thooksstonative.%ssconverting hook "%s" to native
srunning hook %s: %s
tenvirontcwdt
blockedtags
exthook-%stexthooks)exthook-%s: %s finished in %0.2f seconds
s
%s hook %sswarning: %s hook %s
(RR(R$tcurrenttransactiontdirstatetwritetwritependingtroott	iteritemsRR+tdicttlistR	tpprinttuppert
configboolR3Rt
shelltonativeR'RRtgetcwdtsystemR1texplainexitRR2R"(RR
R4tnametcmdR-R7RBtenvttrtktvtoldcmdRLRCREtdesc((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyt_exthookzsD

(
" cC@s�t|�}t|dt�}xo|j�D]a\}}|j|dd|tf�}||kr+|\}}}}	|||tf||<q+q+Wgt|j��D]\}
}}}
||
f^q�S(s8return a list of (hook-id, cmd) pairs sorted by priorityt
_untrustedN(t
_hookitemsR0titemstgetR$t_fromuntrustedtsortedtvalues(RRJtuntrustedhooksR^tvaluettrustedvaluetlptlotlktlvRAtoRbRc((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyt	_allhooks�scC@s�i}x}|jdd|�D]f\}}|jd�s|jd�rLqn|jdd|d�}|t|�||f||<qW|S(s)return all hooks items ready to be sortedRJt	untrusteds	priority.s	tonative.spriority.%si(tconfigitemst
startswitht	configinttlen(RRgRJR^R_tpriority((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyRh�s"!cC@s
|adS(N(t	_redirect(tstate((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pytredirect�scC@sQ|js
tSx=t|�D]/\}}|jd�d|kr|rtSqWtS(s/return True if a hook is configured for 'htype'R
i(t	callhooksR3RvRR0(RR4R5R_((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pythashook�s	c
K@s�|js
tSg}xOt|�D]A\}}|jd�d|kr |r |j||f�q q Wt||||d||�}t}	x(|D] \}}||dp�|	}	q�W|	S(NR
iR7(R�R3RvRtappendtrunhooks(
RR
R4R7R-RJR5R_tresRC((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pythook�s	c	K@s�tj|�}i}d}z{xt|D]l\}}	|dkr�tr�yitjj�}
tjj�}|
dkr�|dkr�tjj�tj	|
�}tj
||
�nWq�ttfk
r�q�Xn|	t
kr)|rtjtd�|dtd���n|jtd�|�d}t}
nXt|	�r\t|||||	||�\}}
n%|	jd�r]|	jd	�d
kr&|	djd	d�\}}	tj|�}|r�tjj|j|�}nytj|d|�}Wn+tk
r|j td
�|��nXt!||	�}n|	dj"�}t|||||||�\}}
n$t#|||||	||�}t}
||
f||<q%WWdtjj�tr�|dkr�tjj�tj
||
�tj$|�nX|S(Ni����isuntrusted hook %s not executedRssee 'hg help config.trusted's(warning: untrusted hook %s not executed
ispython:t:iis	hghook.%ssloading %s hook failed:
(%RtbyteskwargsR}RtstdouttfilenotstderrtflushRtduptdup2tOSErrorR&RkRR2RR"R3RRRytcounttrsplitRt
expandpathRtjoinRSRtloadpathR*RQR%tstripRftclose(RR
R4RJR7R-R�t	oldstdoutR5R_tstdoutnotstderrnoRCtraisedRtmodthookfn((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyR��sd
	


(t
__future__RRRti18nRtRRRRRRtutilsRR	RRftobjectRkRvR3RhR}RR�R�R�(((s4/usr/lib64/python2.7/site-packages/mercurial/hook.pyt<module>s.	_	-