File: //usr/lib/python3/dist-packages/hgext/__pycache__/patchbomb.cpython-310.pyc
o
�]Lbn| � @ s d Z ddlmZ ddlmZ ddlm mZ ddl
m mZ ddl
mZ ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' ddl(m)Z)m*Z* e'j+Z+i Z,e$�-e,�Z-i Z.e$�/e.�Z/e/d d
dd� e/d ddd� e/d d
dd� e/d ddd� e/d ddd� e/d ddd� e/d ddd� e/d ddd� e/d ddd� e/d ddd� dZ0dd� Z1dd� Z2dd� Z3d�dd �Z4d!d"� Z5d#d$� Z6d%d&� Z7 d�d'd(�Z8d)d*� Z9d+d,� Z:d-d.� Z;d/d0� Z<d1d2� Z=d�d3d4�Z>d5d6� Z?d7d8� Z@d9d:ded;�fd<d=ded>�fd?d@dedA�fd9dg edB�edC�fdDd
g edE�edC�fd9ddedF�fdGdHdedI�fd9dJd9edK�edL�fd9dMd9edN�edO�fdPdd9edQ�edC�fdRdSdedT�fdUdVd9edW�edO�fd9dg edX�edC�fdYdZd9ed[�ed\�fd9d]d9ed^�ed_�fd9d`g eda�edb�fdcdg edd�edC�fgZAe-dedfdgdedh�fd9didedj�fdkdldedm�fdndodedp�fdqdrd9eds�edt�fd9dudoedv�edw�fdxdyg edz�ed{�fd9d|ded}�fd9d~g ed�ed{�fd9dded��fg
eA ejB ed��e-jCd��d�d�� �ZDdS )�as command to send changesets as (a series of) patch emails
The series is started off with a "[PATCH 0 of N]" introduction, which
describes the series as a whole.
Each patch email has a Subject line of "[PATCH M of N] ...", using the
first line of the changeset description as the subject text. The
message contains two or three body parts:
- The changeset description.
- [Optional] The result of running diffstat on the patch.
- The patch itself, as generated by :hg:`export`.
Each message refers to the first in the series using the In-Reply-To
and References headers, so they will show up as a sequence in threaded
mail and news readers, and in mail archives.
To configure other defaults, add a section like this to your
configuration file::
[email]
from = My Name <my@email>
to = recipient1, recipient2, ...
cc = cc1, cc2, ...
bcc = bcc1, bcc2, ...
reply-to = address1, address2, ...
Use ``[patchbomb]`` as configuration section name if you need to
override global ``[email]`` address settings.
Then you can use the :hg:`email` command to mail a series of
changesets as a patchbomb.
You can also either configure the method option in the email section
to be a sendmail compatible mailer or fill out the [smtp] section so
that the patchbomb extension can automatically send patchbombs
directly from the commandline. See the [email] and [smtp] sections in
hgrc(5) for details.
By default, :hg:`email` will prompt for a ``To`` or ``CC`` header if
you do not supply one via configuration or the command line. You can
override this to never prompt by configuring an empty value::
[email]
cc =
You can control the default inclusion of an introduction message with the
``patchbomb.intro`` configuration option. The configuration is always
overwritten by command line flags like --intro and --desc::
[patchbomb]
intro=auto # include introduction message if more than 1 patch (default)
intro=never # never include an introduction message
intro=always # always include an introduction message
You can specify a template for flags to be added in subject prefixes. Flags
specified by --flag option are exported as ``{flags}`` keyword::
[patchbomb]
flagtemplate = "{separate(' ',
ifeq(branch, 'default', '', branch|upper),
flags)}"
You can set patchbomb to always ask for confirmation by setting
``patchbomb.confirm`` to true.
� )�absolute_importN)�_)�open)�bin)�cmdutil�commands�encoding�error� formatter�hg�
logcmdutil�mail�patch�pycompat� registrar�scmutil� templater�util)�dateutil�urlutil� patchbomb�
bundletype��defaults bccs cc� confirmF� flagtemplate� from� intro� auto� publicurls reply-tos tos ships-with-hg-corec C s, |� � }|j�dd�}|rd|||f S dS )zFAdd a header pointing to a public URL where the changeset is availabler r s/ Available At %s
# hg pull %s -r %sN)�repo�ui�config)�seq�ctxr � publicurl� r&