[PATCH 1 of 2] patchbomb: only prompt for cc when --to not given

Christian Ebert blacktrash at gmx.net
Tue Feb 2 03:52:31 CST 2010


* Greg Ward on Sunday, January 31, 2010 at 16:04:46 -0500
> On Sat, Jan 30, 2010 at 7:07 AM, Christian Ebert <blacktrash at gmx.net> wrote:
>> # HG changeset patch
>> # User Christian Ebert <blacktrash at gmx.net>
>> # Date 1264796750 0
>> # Node ID b0d68e68c9185059432a31b0357aaf2aedcd975f
>> # Parent  e7727a545c4827f3ff481175d074d065135adbec
>> patchbomb: only prompt for cc when --to not given
>> 
>> This table shows that the behaviour changes in 2 cases (marked *):
> 
> I finally got around to trying this patch out.  Unfortunately, it is
> useless to me.  I did not realize that it was only triggered by
> putting a recipient on the command line, and I almost always put the
> patchbomb recipient in configuration.  (The only project where I
> regularly use patchbomb is Mercurial itself, and there is only one
> recipient that matters: mercurial-devel.)
> 
> So my usual way of sending a one-changeset patch is:
> 
>  hg email -r tip
>  hit <enter> because I never supply cc addresses
>  cross fingers and hope that it really sent what I want it to send
> 
> This could be improved in two ways: 1) do not waste my time with a
> useless "Cc" prompt, and 2) show me a summary of what will be sent
> before sending it.  I think your second patch does a good job of
> addressing #2.  But your change to getting "Cc" has no effect on me.
> ;-(
> 
> So here is a competing idea to Christian's "Cc" patch: make the Cc
> prompt configurable.
> 
> # HG changeset patch
> # User Greg Ward <greg-hg at gerg.ca>
> # Date 1264971099 18000
> # Node ID 4117dce6d51d0d4042f7d5e56706a20f6614c3a6
> # Parent  e768941f14c1b0fdb428023c58ca06bd9c9da30c
> patchbomb: add config 'askcc' to control prompt for Cc addresses.
> 
> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -396,8 +396,10 @@
> 
>         return mail.addrlistencode(ui, [addrs], _charsets, opts.get('test'))
> 
> +    askcc = ui.configbool('patchbomb', 'askcc', default=True)

I was reluctant to add yet another config option because so far
patchbomb only uses config options for recipients which can be
set in the [email] hgrc section. As the command's name is
"hg email", it will be up to you to improve 
http://selenic.com/repo/hg-stable/rev/b08ffd27dfc8
;-) because, indeed, askcc should not be set under [email].

c
-- 
\black\trash movie   _S A M E_  _T I M E_  _S A M E_  _P L A C E_
                                  New York, in the summer of 2001

              --->> http://www.blacktrash.org/underdogma/stsp.php


More information about the Mercurial-devel mailing list