[PATCH v2] patchbomb: make it easy for the user to decline sending an intro message

Christian Ebert blacktrash at gmx.net
Wed Sep 28 01:41:43 CDT 2011


* Greg Ward on Tuesday, September 27, 2011 at 22:44:54 -0400
> # HG changeset patch
> # User Greg Ward <greg at gerg.ca>
> # Date 1317177527 14400
> # Node ID ef1f53332f2dfe658071f378efd913807251363d
> # Parent  41ed7e07f152f2aff63867aec8ae27f6ab04aeaa
> patchbomb: make it easy for the user to decline sending an intro message.
> 
> - prompt(): respect interactive mode; clarify logic a bit
> - rename introneeded() to introwanted() and give it only one caller
> - add 'numbered' arg to makepatch() so it does not need to call
>  introwanted()
> - factor makeintro() out of getpatchmsgs(), so it's easier to skip the
>  intro message based on the user's behaviour
> 
> Unexpected but perfectly reasonable side effect: in non-interactive
> mode, we don't show unanswerable "Cc" or "From" prompts anymore, so
> remove those from the test expectations.

hm, there was a reason for this - if only I could remember it:

changeset:   12197:540693065d40
user:        Christian Ebert <blacktrash at gmx.net>
date:        Wed Sep 08 08:31:07 2010 +0200
files:       hgext/patchbomb.py tests/test-patchbomb.t
description:
patchbomb: show prompt and selection in non-interactive mode

Akin to 01ada7b1861d for the custom patchbomb prompt.


01ada7b1861d says:

changeset:   8940:01ada7b1861d
user:        Mads Kiilerich <mads at kiilerich.com>
date:        Sun Jun 21 03:13:38 2009 +0200
files:       mercurial/ui.py tests/test-merge-prompt.out tests/test-merge-tools.out
description:
ui.prompt: Show prompt and selection in non-interactive mode

ui.prompt was completely silent in non-interactive mode, unless in verbose
mode. It is fine that it chooses the default automatically, but it is confusing
that the message and prompt shown interactively can't be found in scripted
tests.

The prompt and selection is now .write'ed instead of .note'ed.


c
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list