[PATCH] patchbomb: add --text flag to send patches both as inline text and as attachments

Angel Ezquerra Moreu angel.ezquerra at gmail.com
Wed Mar 21 02:40:14 CDT 2012


On Wed, Mar 21, 2012 at 1:39 AM, Greg Ward <greg at gerg.ca> wrote:
> On 20 March 2012, Angel Ezquerra said:
>> # HG changeset patch
>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>> # Date 1332234227 -3600
>> # Node ID 2893014b498c2e3413b0c93e7dfd2708ee0dbb80
>> # Parent  63a1bed65fa32262a45136a583fb6af117215241
>> patchbomb: add --text flag to send patches both as inline text and as attachments
>
> I think --body, --in-body, or --as-body are better names for this
> option.

You are right. I did not like "--text" too much but I could not think
of anything better. I like "in-body" much more!

I believe that it is currently preferred not to use "-" on flag names.
However the email command already uses them on several of its flag
names (e.g. reply-to and in-reply-to). Should the new option be called
"inbody" instead?


>> There is currently no way to make patchbombo include patches both as attachments
>
> patchbombo is the Spanish spelling? ;-)

:-) Probably "bomba de parches" would be the accurate term.

>> and as inline text. This would be quite convenient when sending patches to
>> people who use web email clients (e.g. gmail) which often mangle the patches,
>> making them hard to apply.
>>
>> The default behavior of the email command is unchanged. However you can now
>> use the --text flag _in addition_ to the -i or -a flags, in which case the
>> patchbomb emails will contain the patch as inline text and as an attachment.
>>
>> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
>> --- a/hgext/patchbomb.py
>> +++ b/hgext/patchbomb.py
>
> Tests?

I thought that I could not run the tests on Windows, which is my only
development environment (I am using hackable mercurial 2.1). However
http://mercurial.selenic.com/wiki/HackableMercurial implies that it
should be possible to run part of the test suite now (although the
setting it up seems a bit complicated).

Do you know if the patchbomb tests can be run on Windows?

Angel


More information about the Mercurial-devel mailing list