KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/hgext/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/hgext/blackbox.pyo
�
Hq�Qc@s�dZddlmZmZddlmZddlZddlZddlZiZ	ej
e	�Z
dZda
d�Zd�Zd�Ze
d	d
dded
�fged��d��ZdS(slog repository events to a blackbox for debugging

Logs event information to .hg/blackbox.log to help debug and diagnose problems.
The events that get logged can be configured via the blackbox.track config key.
Examples::

  [blackbox]
  track = *

  [blackbox]
  track = command, commandfinish, commandexception, exthook, pythonhook

  [blackbox]
  track = incoming

  [blackbox]
  # limit the size of a log file
  maxsize = 1.5 MB
  # rotate up to N log files when the current one gets too big
  maxfiles = 3

i����(tutiltcmdutil(t_Ntinternalcs,d|jf�fd��Y��|_dS(Nt
blackboxuics;eZejd��Zd�Z�fd�Zd�ZRS(cSs|jdddg�S(Ntblackboxttrackt*(t
configlist(tself((s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyR+scs�fd�}�jdd�}�jddd�}|dkrtj|j��}|j|kr|j}|j��jddd	�}xIt	|d
d
d�D]1}|dd
||d
fdd
||f�q�W|d|d|dko�|d��jdd�}qn|S(Ncs�ytj|�WnBtk
rU}|jtjkrV�jd||jf�qVnXy|rrtj||�nWnEtk
r�}|jtjkr��jd|||jf�q�nXdS(Ns warning: cannot remove '%s': %s
s(warning: cannot rename '%s' to '%s': %s
(tostunlinktOSErrorterrnotENOENTtdebugtstrerrortrename(toldpathtnewpathterr(R	(s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pytrotate0s		sblackbox.logtaRtmaxsizeiitmaxfilesiii����Rs%s.%dRs.1(
t	_bbopenertconfigbytesR
tfstattfilenotst_sizetnametcloset	configinttxrange(R	RtfpRtsttpathRti((R	s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyt_openlogfile/s 	
c	s]t�|�j|||�d|jkr>||jkr>dStj|d�r\|j}nvtj|d�r�y|j�|_Wn<ttfk
r�}|j	d|j
�|`d|_nX|j}nt
}|rYtjdd�}tj�}|d|d}y|jd|||f�Wn'tk
rO}|j	d|j
�nX|a
ndS(	NRt	_blackboxRs*warning: cannot write to blackbox.log: %s
s%Y/%m/%d %H:%M:%Siis	%s %s> %s(tsupertlogRRtsafehasattrR'R&tIOErrorRRRRtNonetlastblackboxtdatestrtgetusertwrite(	R	teventtmsgtoptsRRtdatetusertformattedmsg(R(s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyR)Os2	
	cSs|j|_dS(N(topenerR(R	trepo((s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pytsetrepors(t__name__t
__module__Rt
propertycacheRR&R)R9((R(s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyR*s	 #(t	__class__(tui((Rs4/usr/lib64/python2.7/site-packages/hgext/blackbox.pytwrapui)sKcCst|�dS(N(R?(R>((s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pytuisetupwscCs6|j�sdStj|d�r2|j|�ndS(NR9(tlocalRR*R9(R>R8((s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyt	reposetupzss	^blackboxtltlimiti
sthe number of events to showshg blackbox [OPTION]...c
Os�tjj|jd��sdS|jd�}|jdd�}|j�jd�}d}g}xPt|�D]B}	||kr�Pnt	j
d|	�r�|d7}n|j|	�qnW|jdjt|���dS(	s&view the recent repository events
    sblackbox.logNRDtrs
is+^\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} .*> .*i(
R
R$texiststjointgetR7treadtsplittreversedtretmatchtappendtstatus(
R>R8trevsR3RDRtlinestcounttoutputtline((s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyR�s
(t__doc__t	mercurialRRtmercurial.i18nRR
R
RLtcmdtabletcommandt
testedwithR,R-R?R@RBR(((s4/usr/lib64/python2.7/site-packages/hgext/blackbox.pyt<module>s$	N		


Anon7 - 2021