https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/hooklib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/hooklib/__pycache__/changeset_obsoleted.cpython-310.pyc
o

�]Lb��@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
Cs\|�dd�p|�dd�}|�dd�p|�dd�}|�dd�}t�|�}t�|||�}|��t�||d�}t�}	|j	D]!\}
}|durI|	�
|
�q;|�d||���}t
|�r\|	�
|
�q;q;t
|	�dkrj|�d	�dS|j||��|�d
d�|j|jd�|��}zt�|�}
Wntjy�}zt�|��d}~wwt�|||�|
d
<t�|||d�|
d<t�tjdd��|
d<|
ds�|�dd�p�|��}d|vs�d|vr�|�|�}t� |||j!|j"�|
d<d�#t$|	��|
d<t%j&r�|
�'�n|
�(�}|�)dd��r|�*|�|�+d��s
|�*d�dSdS|�,t-d�|���tj.|t/�0|
d�d|	||j1d�dS)Nrrsnotifyrrsincomings
%r and %d:rs=notify_obsoleted: no subscribers to selected repo and revset
swebsbaseurl)�changes�baseurl�root�webrootzIn-reply-tos
-obsoletedz
Message-Ids%a, %d %b %Y %H:%M:%S %1%2)�format�Date�Fromsemailsfrom�@s
@localhostz, �Tostest�
s&notify_obsoleted: sending mail for %d
�)�mbox)2�configr�literal_templatespecr�changesettemplater�
pushbufferr�notifier�set�subs�add�revs�rev�len�debug�show�	changesetr�	popbufferr�
parsebytes�emailerrors�MessageParseErrorr�Abort�	messageidr�strfromlocalr�datestr�username�fixmail�
addressencode�charsets�test�join�sortedr
�ispy3�as_bytes�	as_string�
configbool�write�endswith�statusr�sendmail�
emailutils�	parseaddrr)�ui�repo�ctx�domain�
messageidseed�template�spec�	templater�nr&�subr(�data�msg�inst�sender�msgtext�rV�C/usr/lib/python3/dist-packages/hgext/hooklib/changeset_obsoleted.py�_report_commit>s���
�


��
�
��
�
�

�
�rXcs"t�fdd�t�|j�g�D��S)Nc3s�|]	}|�kr|VqdS�NrV)�.0�r�r)rVrW�	<genexpr>�s��z has_successor.<locals>.<genexpr>)�anyr	�
allsuccessors�obsstore)rHr)rVr\rW�
has_successor�s�racKsb|dkrt�td�t�|���tj||dd�D]}|��|}t||�	��s.t
|||�qdS)NstxnclosesUnsupported hook type %rr)r)rr2rr
�bytestrr	�getobsoleted�
unfilteredra�noderX)rGrH�hooktypere�kwargsr)rIrVrVrW�hook�s���rhrY)�__doc__�
__future__r�email.errors�errorsr0�email.utils�utilsrE�mercurial.i18nr�	mercurialrrrrrr	r
r�mercurial.utilsr�r�configtable�
configitemrXrarhrVrVrVrW�<module>s8(

���
D

https://t.me/RX1948 - 2025