403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/__pycache__/logtoprocess.cpython-39.opt-1.pyc
a

�+�b]�@sDdZddlmZddlZddlmZdZGdd�de�Zdd	�Z	dS)
a:send ui.log() data to a subprocess (EXPERIMENTAL)

This extension lets you specify a shell command per ui.log() event,
sending all remaining arguments to as environment variables to that command.

Positional arguments construct a log message, which is passed in the `MSG1`
environment variables. Each keyword argument is set as a `OPT_UPPERCASE_KEY`
variable (so the key is uppercased, and prefixed with `OPT_`). The original
event name is passed in the `EVENT` environment variable, and the process ID
of mercurial is given in `HGPID`.

So given a call `ui.log('foo', 'bar %s
', 'baz', spam='eggs'), a script
configured for the `foo` event can expect an environment with `MSG1=bar baz`,
and `OPT_SPAM=eggs`.

Scripts are configured in the `[logtoprocess]` section, each key an event name.
For example::

  [logtoprocess]
  commandexception = echo "$MSG1" > /var/log/mercurial_exceptions.log

would log the warning message and traceback of any failed command dispatch.

Scripts are run asynchronously as detached daemon processes; mercurial will
not ensure that they exit cleanly.

�)�absolute_importN)�procutilsships-with-hg-corec@s(eZdZdZdd�Zdd�Zdd�ZdS)	�
processloggerz_Map log events to external commands

    Arguments are passed on as environment variables.
    cCst|�d��|_dS�Nslogtoprocess)�dictZconfigitems�_scripts)�self�ui�r
�8/usr/lib64/python3.9/site-packages/hgext/logtoprocess.py�__init__6szprocesslogger.__init__cCst|j�|��S)N)�boolr�get)r�eventr
r
r�tracked9szprocesslogger.trackedc	Csp|j|}d}t|�|kr*|d|�d}|t��|d�}|�dd�|��D��t�|�}tj||dd�dS)Ni��s (truncated))sEVENTsHGPIDsMSG1css"|]\}}d|��|fVqdS)sOPT_%sN)�upper)�.0�key�valuer
r
r�	<genexpr>Ksz$processlogger.log.<locals>.<genexpr>T)�shell)	r�len�os�getpid�update�itemsrZshellenvironZrunbgcommand)	rr	r�msgZoptsZscriptZmaxmsg�envZfullenvr
r
r�log<s
�
�
zprocesslogger.logN)�__name__�
__module__�__qualname__�__doc__rrrr
r
r
rr0srcCs|�dt|��dSr)Z	setloggerr)r	r
r
r�
uipopulateRsr#)
r"Z
__future__rrZmercurial.utilsrZ
testedwith�objectrr#r
r
r
r�<module>s"

Youez - 2016 - github.com/yon3zu
LinuXploit