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 :  /usr/lib64/python3.9/site-packages/hgext/hooklib/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

�+�b��@s�dZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
mZmZmZmZmZmZddlmZddlmZiZe�e�Zed	d
dd�ed	ddd�ed	d
dd�dd�Zdd�Zddd�ZdS)a�changeset_obsoleted is a hook to send a mail when an
existing draft changeset is obsoleted by an obsmarker without successor.

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.changeset_obsoleted =     python:hgext.hooklib.changeset_obsoleted.hook
�)�absolute_importN)�_)�encoding�error�	formatter�
logcmdutil�mail�obsutil�pycompat�	registrar)�dateutil�)�notify�notify_obsoleted�domain)�default�
messageidseed�templatesASubject: changeset abandoned

This changeset has been abandoned.
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_obsoleted: no subscribers to selected repo and revset
swebsbaseurl)�changesZbaseurl�rootZwebrootzIn-reply-tos
-obsoletedz
Message-Ids%a, %d %b %Y %H:%M:%S %1%2)�formatZDateZFromsemailsfrom�@s
@localhostz, ZTostest�
s&notify_obsoleted: sending mail for %d
�)�mbox)2ZconfigrZliteral_templatespecrZchangesettemplaterZ
pushbufferrZnotifier�set�subs�add�revs�rev�len�debugZshowZ	changesetrZ	popbufferrZ
parsebytes�emailerrorsZMessageParseErrorr�AbortZ	messageidrZstrfromlocalrZdatestr�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�r7�G/usr/lib64/python3.9/site-packages/hgext/hooklib/changeset_obsoleted.py�_report_commit>sz��
�


�
� 
�
�


�r9cs"t�fdd�t�|j�g�D��S)Nc3s|]}|�kr|VqdS)Nr7)�.0�r�rr7r8�	<genexpr>�sz has_successor.<locals>.<genexpr>)�anyr	Z
allsuccessorsZobsstore)r-rr7r<r8�
has_successor�s�r?cKsb|dkr t�td�t�|���tj||dd�D]*}|��|}t||�	��s2t
|||�q2dS)NstxnclosesUnsupported hook type %rr)r)rr#rr
Zbytestrr	ZgetobsoletedZ
unfilteredr?�noder9)r,r-Zhooktyper@�kwargsrr.r7r7r8�hook�s�rB)N)�__doc__Z
__future__rZemail.errors�errorsr"Zemail.utilsZutilsr+Zmercurial.i18nrZ	mercurialrrrrrr	r
rZmercurial.utilsr�rZconfigtableZ
configitemr9r?rBr7r7r7r8�<module>s6(

���
D

Youez - 2016 - github.com/yon3zu
LinuXploit