Ë �DR6}ˆãó:—dZddlZddlmZdZGd„d«Zd„Zy)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. éN)Úprocutilsships-with-hg-corecó"—eZdZdZd„Zd„Zd„Zy)Ú processloggerz_Map log events to external commands Arguments are passed on as environment variables. cóB—t|jd««|_y©Ns logtoprocess)ÚdictÚ configitemsÚ_scripts)ÚselfÚuis ú6usr/lib/python3.12/site-packages/hgext/logtoprocess.pyÚ__init__zprocesslogger.__init__5s€Ü˜RŸ^™^¨OÓ<Ó=ˆ� ócóJ—t|jj|««S)N)Úboolr Úget)r Úevents r Útrackedzprocesslogger.tracked8s€Ü�D—M‘M×%Ñ% eÓ,Ó-Ð-rcó(—|j|}d}t|«|kDr|d|dz}|tj«|dœ}|j d„|j «D««t j|«}t j||d¬«y)Ni †s (truncated))sEVENTsHGPIDsMSG1c3óLK—|]\}}d|j«z|f–—Œy­w)sOPT_%sN)Úupper)Ú.0ÚkeyÚvalues r Ú z$processlogger.log..Js(èø€ð Ù?K±°°eˆY˜Ÿ™›Ñ $ eÔ ,¹|ùs‚"$T)Úshell) r ÚlenÚosÚgetpidÚupdateÚitemsrÚ shellenvironÚ runbgcommand) r r rÚmsgÚoptsÚscriptÚmaxmsgÚenvÚfullenvs r Úlogzprocesslogger.log;sŽ€Ø—‘˜uÑ%ˆØˆÜ ˆs‹8�fÒ ð �g�v�, Ñ0ˆCàÜ—i‘i“kØñ ˆð � ‰ ñ Ø?C¿z¹z¼|ó ô ô×'Ñ'¨Ó,ˆÜ×јf g°TÖ:rN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr*©rr rr/s„ñò >ò.ó;rrcó:—|jdt|««yr)Ú setloggerr)r s r Ú uipopulater2Qs€Ø‡L�L�¤-°Ó"3Õ4r)r.rÚmercurial.utilsrÚ testedwithrr2r/rr Úr5s)ðñó: å$ð #€ ÷;ñ;óD5r