Skip to content

Commit 41db137

Browse files
committed
Merge branch 'mm/multimail-1.5'
Update "git multimail" from the upstream. * mm/multimail-1.5: git-multimail: update to release 1.5.0
2 parents 9462ac7 + 99177b3 commit 41db137

File tree

8 files changed

+281
-57
lines changed

8 files changed

+281
-57
lines changed

contrib/hooks/multimail/CHANGES

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
Release 1.5.0
2+
=============
3+
4+
Backward-incompatible change
5+
----------------------------
6+
7+
The name of classes for environment was misnamed as `*Environement`.
8+
It is now `*Environment`.
9+
10+
New features
11+
------------
12+
13+
* A Thread-Index header is now added to each email sent (except for
14+
combined emails where it would not make sense), so that MS Outlook
15+
properly groups messages by threads even though they have a
16+
different subject line. Unfortunately, even adding this header the
17+
threading still seems to be unreliable, but it is unclear whether
18+
this is an issue on our side or on MS Outlook's side (see discussion
19+
here: https://github.com/git-multimail/git-multimail/pull/194).
20+
21+
* A new variable multimailhook.ExcludeMergeRevisions was added to send
22+
notification emails only for non-merge commits.
23+
24+
* For gitolite environment, it is now possible to specify the mail map
25+
in a separate file in addition to gitolite.conf, using the variable
26+
multimailhook.MailaddressMap.
27+
28+
Internal changes
29+
----------------
30+
31+
* The testsuite now uses GIT_PRINT_SHA1_ELLIPSIS where needed for
32+
compatibility with recent Git versions. Only tests are affected.
33+
34+
* We don't try to install pyflakes in the continuous integration job
35+
for old Python versions where it's no longer available.
36+
37+
* Stop using the deprecated cgi.escape in Python 3.
38+
39+
* New flake8 warnings have been fixed.
40+
41+
* Python 3.6 is now tested against on Travis-CI.
42+
43+
* A bunch of lgtm.com warnings have been fixed.
44+
45+
Bug fixes
46+
---------
47+
48+
* SMTPMailer logs in only once now. It used to re-login for each email
49+
sent which triggered errors for some SMTP servers.
50+
51+
* migrate-mailhook-config was broken by internal refactoring, it
52+
should now work again.
53+
54+
This version was tested with Python 2.6 to 3.7. It was tested with Git
55+
1.7.10.406.gdc801, 2.15.1 and 2.20.1.98.gecbdaf0.
56+
157
Release 1.4.0
258
=============
359

contrib/hooks/multimail/CONTRIBUTING.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ Contributing
44
git-multimail is an open-source project, built by volunteers. We would
55
welcome your help!
66

7-
The current maintainers are Matthieu Moy
8-
<[email protected]> and Michael Haggerty
9-
7+
The current maintainers are `Matthieu Moy <http://matthieu-moy.fr>`__ and
8+
`Michael Haggerty <https://github.com/mhagger>`__.
109

1110
Please note that although a copy of git-multimail is distributed in
1211
the "contrib" section of the main Git project, development takes place
@@ -33,6 +32,29 @@ mailing list`_.
3332
Please CC emails regarding git-multimail to the maintainers so that we
3433
don't overlook them.
3534

35+
Help needed: testers/maintainer for specific environments/OS
36+
------------------------------------------------------------
37+
38+
The current maintainer uses and tests git-multimail on Linux with the
39+
Generic environment. More testers, or better contributors are needed
40+
to test git-multimail on other real-life setups:
41+
42+
* Mac OS X, Windows: git-multimail is currently not supported on these
43+
platforms. But since we have no external dependencies and try to
44+
write code as portable as possible, it is possible that
45+
git-multimail already runs there and if not, it is likely that it
46+
could be ported easily.
47+
48+
Patches to improve support for Windows and OS X are welcome.
49+
Ideally, there would be a sub-maintainer for each OS who would test
50+
at least once before each release (around twice a year).
51+
52+
* Gerrit, Stash, Gitolite environments: although the testsuite
53+
contains tests for these environments, a tester/maintainer for each
54+
environment would be welcome to test and report failure (or success)
55+
on real-life environments periodically (here also, feedback before
56+
each release would be highly appreciated).
57+
3658

3759
.. _`git-multimail repository on GitHub`: https://github.com/git-multimail/git-multimail
3860
.. _`Git mailing list`: [email protected]

contrib/hooks/multimail/README.Git

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ website:
66
https://github.com/git-multimail/git-multimail
77

88
The version in this directory was obtained from the upstream project
9-
on August 17 2016 and consists of the "git-multimail" subdirectory from
9+
on January 07 2019 and consists of the "git-multimail" subdirectory from
1010
revision
1111

12-
07b1cb6bfd7be156c62e1afa17cae13b850a869f refs/tags/1.4.0
12+
04e80e6c40be465cc62b6c246f0fcb8fd2cfd454 refs/tags/1.5.0
1313

1414
Please see the README file in this directory for information about how
1515
to report bugs or contribute to git-multimail.

contrib/hooks/multimail/README renamed to contrib/hooks/multimail/README.rst

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
git-multimail version 1.4.0
1+
git-multimail version 1.5.0
22
===========================
33

44
.. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=master
@@ -20,8 +20,8 @@ GPLv2 (see the COPYING file for details).
2020

2121
Please note: although, as a convenience, git-multimail may be
2222
distributed along with the main Git project, development of
23-
git-multimail takes place in its own, separate project. See section
24-
"Getting involved" below for more information.
23+
git-multimail takes place in its own, separate project. Please, read
24+
`<CONTRIBUTING.rst>`__ for more information.
2525

2626

2727
By default, for each push received by the repository, git-multimail:
@@ -89,6 +89,10 @@ Requirements
8989
the multimailhook.mailer configuration variable below for how to
9090
configure git-multimail to send emails via an SMTP server.
9191

92+
* git-multimail is currently tested only on Linux. It may or may not
93+
work on other platforms such as Windows and Mac OS. See
94+
`<CONTRIBUTING.rst>`__ to improve the situation.
95+
9296

9397
Invocation
9498
----------
@@ -369,7 +373,7 @@ multimailhook.mailer
369373
unset, then the value of multimailhook.from is used.
370374

371375
multimailhook.smtpServerTimeout
372-
Timeout in seconds.
376+
Timeout in seconds. Default is 10.
373377

374378
multimailhook.smtpEncryption
375379
Set the security type. Allowed values: ``none``, ``ssl``, ``tls`` (starttls).
@@ -419,8 +423,20 @@ multimailhook.from, multimailhook.fromCommit, multimailhook.fromRefchange
419423
If config values are unset, the value of the From: header is
420424
determined as follows:
421425

422-
1. (gitolite environment only) Parse gitolite.conf, looking for a
423-
block of comments that looks like this::
426+
1. (gitolite environment only)
427+
1.a) If ``multimailhook.MailaddressMap`` is set, and is a path
428+
to an existing file (if relative, it is considered relative to
429+
the place where ``gitolite.conf`` is located), then this file
430+
should contain lines like::
431+
432+
username Firstname Lastname <[email protected]>
433+
434+
git-multimail will then look for a line where ``$GL_USER``
435+
matches the ``username`` part, and use the rest of the line for
436+
the ``From:`` header.
437+
438+
1.b) Parse gitolite.conf, looking for a block of comments that
439+
looks like this::
424440

425441
# BEGIN USER EMAILS
426442
# username Firstname Lastname <[email protected]>
@@ -436,6 +452,11 @@ multimailhook.from, multimailhook.fromCommit, multimailhook.fromRefchange
436452

437453
3. Use the value of multimailhook.envelopeSender.
438454

455+
multimailhook.MailaddressMap
456+
(gitolite environment only)
457+
File to look for a ``From:`` address based on the user doing the
458+
push. Defaults to unset. See ``multimailhook.from`` for details.
459+
439460
multimailhook.administrator
440461
The name and/or email address of the administrator of the Git
441462
repository; used in FOOTER_TEMPLATE. Default is
@@ -484,6 +505,11 @@ multimailhook.maxCommitEmails
484505
mailbombing, for example on an initial push. To disable commit
485506
emails limit, set this option to 0. The default is 500.
486507

508+
multimailhook.excludeMergeRevisions
509+
When sending out revision emails, do not consider merge commits (the
510+
functional equivalent of `rev-list --no-merges`).
511+
The default is `false` (send merge commit emails).
512+
487513
multimailhook.emailStrictUTF8
488514
If this boolean option is set to `true`, then the main part of the
489515
email body is forced to be valid UTF-8. Any characters that are

contrib/hooks/multimail/doc/gitolite.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ and add::
4646
config multimailhook.mailingList = # Where emails should be sent
4747
config multimailhook.from = # From address to use
4848

49+
Note that by default, gitolite forbids ``<`` and ``>`` in variable
50+
values (for security/paranoia reasons, see
51+
`compensating for UNSAFE_PATT
52+
<http://gitolite.com/gitolite/git-config/index.html#compensating-for-unsafe95patt>`__
53+
in gitolite's documentation for explanations and a way to disable
54+
this). As a consequence, you will not be able to use ``First Last
55+
<[email protected]>`` as recipient email, but specifying
56+
``[email protected]`` alone works.
57+
4958
Obviously, you can customize all parameters on a per-repository basis by
5059
adding these ``config multimailhook.*`` lines in the section
5160
corresponding to a repository or set of repositories.

0 commit comments

Comments
 (0)