HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/hgext/logtoprocess.pyc
ó
ÛXc@@sedZddlmZddlZddlZddlZddlZddlZdZd„Z	dS(s]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.

Each positional argument to the method results in a `MSG[N]` key in the
environment, starting at 1 (so `MSG1`, `MSG2`, etc.). 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', 'baz', spam='eggs'), a script configured
for the `foo` event can expect an environment with `MSG1=bar`, `MSG2=baz`, and
`OPT_SPAM=eggs`.

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

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

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

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

i(tabsolute_importNsships-with-hg-corec@sotjƒdkr7d}|tjB‰‡fd†‰n	d„‰d|jf‡‡fd†ƒY‰ˆ|_dS(NtWindowsic
@s)tj|dtd|dtdˆƒdS(Ntshelltenvt	close_fdst
creationflags(t
subprocesstPopentTrue(tscriptR(t_creationflags(s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pytrunshellcommand9scS@s’tjƒ}|rdStjdkr8itjd6}n
itd6}z8tj|dtdttj	dƒd|d	t|Wdtj
d
ƒXdS(Niit
preexec_fntstart_new_sessionRtstdintrRRi(ii(tostforktsystversion_infotsetsidRRRtopentdevnullt_exit(R	Rtpidt
newsession((s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pyR@s
$tlogtoprocessuic@seZ‡‡fd†ZRS(c
@s|jd|ƒ}|ró|rry|d|p5|d}Wn!ttfk
r]|d}nX|f|d}n|}d„t|dƒDƒ}d„|jƒDƒ}ttjtj	j
ƒ||ƒd|dttjƒƒƒ}	ˆ||	ƒnt
ˆ|ƒj|||ŽS(spMap log events to external commands

            Arguments are passed on as environment variables.

            tlogtoprocessiics@s0|]&\}}dj|ƒt|ƒfVqdS(sMSG{0:d}N(tformattstr(t.0titm((s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pys	<genexpr>rscs@s6|],\}}dj|jƒƒt|ƒfVqdS(sOPT_{0}N(RtupperR(Rtkeytvalue((s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pys	<genexpr>vstEVENTtHGPID(tconfigt	TypeErrortKeyErrort	enumeratet	iteritemstdictt	itertoolstchainRtenvirontitemsRtgetpidtsupertlog(
tselfteventtmsgtoptsR	t	formattedtmessagestmsgpairstoptpairsR(RR(s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pyR2Ys$(t__name__t
__module__R2((RR(s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pyRXs(tplatformtsystemRtCREATE_NEW_PROCESS_GROUPt	__class__(tuitDETACHED_PROCESS((R
RRs6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pytuisetup1s
	")(
t__doc__t
__future__RR,RR=RRt
testedwithRC(((s6/usr/lib/python2.7/dist-packages/hgext/logtoprocess.pyt<module>!s