📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/shelley/public_html/shelleycutler.com/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib64
›
python3.9
›
site-packages
›
hgext
›
📁 __pycache__
📍
Lokasi:
/usr/lib64/python3.9/site-packages/hgext/__pycache__
💾
Free:
45.8 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: logtoprocess.cpython-39.pyc
a �+�b] � @ sD d Z ddlmZ ddlZddlmZ dZG dd� 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)�procutils ships-with-hg-corec @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) � processloggerz_Map log events to external commands Arguments are passed on as environment variables. c C s t |�d��| _d S �Ns logtoprocess)�dictZconfigitems�_scripts)�self�ui� r �8/usr/lib64/python3.9/site-packages/hgext/logtoprocess.py�__init__6 s zprocesslogger.__init__c C s t | j�|��S )N)�boolr �get)r �eventr r r �tracked9 s zprocesslogger.trackedc C sp | j | }d}t|�|kr*|d |� d }|t�� |d�}|�dd� |�� D �� t�|�}tj||dd� d S )Ni�� s (truncated))s EVENTs HGPIDs MSG1c s s"