[PATCH 4 of 5 RFC] patchbomb: lay test groundwork for some new functionality

Augie Fackler raf at durin42.com
Fri Jun 16 10:52:48 EDT 2017


> On Jun 16, 2017, at 08:27, Denis Laxalde <denis at laxalde.org> wrote:
> 
> Augie Fackler a écrit :
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1497385899 14400
>> #      Tue Jun 13 16:31:39 2017 -0400
>> # Node ID c98f63a3e8ee15645646539ba08b7b7682237cab
>> # Parent  218470bf601bb0baaae333c73ccc0aab615d8f40
>> patchbomb: lay test groundwork for some new functionality
>> 
>> These email blobs are so big, it'll make things easier to review to
>> add this, then implement the feature so the behavior variation is
>> obvious.
>> 
>> diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
>> --- a/tests/test-patchbomb.t
>> +++ b/tests/test-patchbomb.t
>> @@ -3028,3 +3028,155 @@ multiple heads are missing at public
>>   [255]
>> 
>> #endif
>> +
>> +Test hg email defaults settings:
>> +  $ cat >> .hgemaildefaults <<EOF
>> +  > [devel]
>> +  > to = mercurial-devel at example.com
>> +  > [devel.setsubscriptions]
>> +  > c or d = c-or-d at example.com
>> +  > a or b = a-or-b at example.com
>> +  > EOF
>> +This change modifies file d
>> +  $ hg email --date '1970-1-1 0:2' --to=devel --test -r 10 --config patchbomb.publicurl=
> 
> I wonder if abusing the --to flag to select an alias (i.e. the "devel"
> section in .hgemaildefaults, not sure how to name this) is really a good
> idea. It gets confusing because, depending on the value of the --to
> flag, the behavior is significantly different.
> Maybe consider a dedicated flag (e.g. --alias=devel, suggesting "alias"
> in the sense of email alias)?

I disagree. If others agree with you, I'm happy to change it. Think of it as a virtual mailing list of sorts.

> That would also allow the command to work without a "to=" option under
> "[devel]" section in .hgemaildefaults (e.g. one might only want a "cc=").

It already does.


More information about the Mercurial-devel mailing list