[PATCH] patchbomb: treat address of "none" as no addresses

Yuya Nishihara yuya at tcha.org
Wed Jan 6 07:16:51 CST 2016


On Tue, 5 Jan 2016 12:47:16 -0500, Augie Fackler wrote:
> 
> > On Jan 5, 2016, at 10:23 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> > 
> > On Mon, 04 Jan 2016 21:56:17 -0800, Bryan O'Sullivan wrote:
> >> # HG changeset patch
> >> # User Bryan O'Sullivan <bos at serpentine.com>
> >> # Date 1451973286 28800
> >> #      Mon Jan 04 21:54:46 2016 -0800
> >> # Node ID 5f9f47b07d59c1c86936e4e4bdb8764f7ce3b9b0
> >> # Parent  09ce74e1f92f8838bbcd2ac1309519f0448ffbed
> >> patchbomb: treat address of "none" as no addresses
> >> 
> >> Previously it wasn't possible to use configuration to avoid
> >> being prompted for e.g. a CC list when using patchbomb to send
> >> emails.
> >> 
> >> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> >> --- a/hgext/patchbomb.py
> >> +++ b/hgext/patchbomb.py
> >> @@ -35,7 +35,14 @@ configuration file::
> >> 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
> >> +To indicate no email addresses in the ``to`` or ``cc`` field, use
> >> +``none``::
> >> +
> >> +  [email]
> >> +  to = some-list at example.org
> >> +  cc = none
> > 
> > "none" can be a username, so it can be a valid local email address in theory.
> 
> I’m not inclined to worry about that. In theory people could use the full
> @host form instead?

Yep, but people have to use the full form only for "none" user. A short form
is somewhat useful on intranet where local SMTP servers are responsible to
rewriting a login name to a full email address.

And I don't like a config value of any-text-but-x style. It's troublesome.


More information about the Mercurial-devel mailing list