Commit Graph

175 Commits

Author SHA1 Message Date
Christian Ebert
57eed7cac3 patchbomb: add --confirm option to show series details and ask for confirmation
--confirm presents same prompt as --diffstat, but does not write
a diffstat to the messages' bodies.

A simple test simulating a negative response is included.
2010-09-10 15:32:22 +02:00
Christian Ebert
c4731e2be5 patchbomb: let diffstat prompt only once with complete summary
This changes the behaviour of --diffstat.
Before the user was asked for confirmation of each patch with its
description and diffstat, and a final summary.

Now there is only one prompt right before sending with a final
summary which does not include the patch descriptions, but the
message details and the diffstats:

  Final summary:

  From: sender
  To: recipient(s)
  Cc: (if present)
  Bcc: (if present)
  Reply-To: (if present)
  Subject: [patch 0 of x [flags]] intro (if present)
      a |  28 ++++++++++++++++++++++++++++
      b |  15 +++++++++++++++
  Subject: [patch 1 of x [flags]] subject
      a |  28 ++++++++++++++++++++++++++++
  [ ... ]

  are you sure you want to send (yn)?
2010-09-10 15:32:14 +02:00
Martin Geisler
5e2d304679 patchbomb: rename argument to avoid shadowing patch module 2010-09-10 15:56:13 +02:00
Christian Ebert
c71ec4c740 patchbomb: show prompt and selection in non-interactive mode
Akin to 023d1310d8a4 for the custom patchbomb prompt.
2010-09-08 08:31:07 +02:00
Christian Ebert
c44df41dfd patchbomb: use ui.promptchoice for diffstat to allow localization of choices
The extra check for ui.interacive from patchbomb's prompt function is not
needed here.

Format boolean prompt as in filemerge.py.
2010-09-08 08:31:07 +02:00
Christian Ebert
63a3341098 patchbomb: remove unneeded line continuation 2010-08-25 23:26:18 +01:00
Christian Ebert
60b4f2db95 patchbomb: reduce number of opts.get calls
Rename outgoing() function to getoutgoing() analogous to
getbundle() etc. to avoid name conflict.
2010-06-16 00:37:21 +02:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Dirkjan Ochtman
cf1de649bd move discovery methods from localrepo into new discovery module 2010-06-07 18:35:54 +02:00
Matt Mackall
86ebd43d71 remoteui: move from cmdutil to hg 2010-06-01 11:18:57 -05:00
Martin Geisler
efb4a38a04 Use our custom hg reStructuredText role some more
I missed these occurrences on my first scan through the source.
2010-05-18 16:31:10 +02:00
Yuya Nishihara
1027c10b16 patchbomb: respect HGPLAIN when piping --test output to PAGER
It makes easy to use `hg email --test` from another tool.
2010-05-16 22:23:14 +09:00
Cédric Duval
2207d76e14 patchbomb: Reply-To support
From RFC 5322:
  an optional reply-to field MAY also be included, which contains the field
  name "Reply-To" and a comma-separated list of one or more addresses.
  [...]
  When the "Reply-To:" field is present, it indicates the address(es) to which
  the author of the message suggests that replies be sent.  In the absence of
  the "Reply-To:" field, replies SHOULD by default be sent to the mailbox(es)
  specified in the "From:" field unless otherwise specified by the person
  composing the reply.

Reply-To addresses may be specified either via command line with --reply-to
or via the 'email' or 'patchbomb' sections of the config file.
2010-05-10 22:06:28 +02:00
Martin Geisler
f1853c5e82 Use hg role in help strings 2010-04-22 10:24:49 +02:00
Cédric Duval
c0a6443df8 patchbomb: --desc implies --intro
For a single patch, an introductory text should not remain unsent
if --intro has been omitted, as the intent of --desc is clear.
2010-03-15 22:37:38 +01:00
Benoit Boissinot
04d99f9fbc patch/diff: move patch.export() to cmdutil.export()
This API change will allow us to break a cycle between patch and cmdutil.
2010-03-08 19:43:24 +01:00
Sune Foldager
5020620fca interpret repo#name url syntax as branch instead of revision
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
2010-02-07 14:29:07 +01:00
Martin Geisler
8664a6b426 Merge with stable. 2010-01-29 01:04:38 +01:00
Christian Ebert
a215bd3d0b patchbomb: document [patchbomb] config section for addresses 2010-01-28 11:27:09 +00:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Sune Foldager
0bec7f7de3 patchbomb: fix bug introduced in a6a075e49b19 and add test
Thanks to Augie Fackler for reporting this.
2009-12-08 23:23:59 +01:00
Sune Foldager
d262a88c75 patchbomb: handle repository#rev URLs correctly 2009-12-06 23:22:17 +01:00
Patrick Mezard
29f1e65f87 patchbomb: normalize date format in generated mboxes
mbox format should use time.asctime(). Unfortunately, this function writes
2-characters day of week on Windows while unix one writes a single character.
Normalize to Windows version since the other one can hardly be written with
strftime().
2009-11-08 18:08:24 +01:00
Alexander Solovyov
3603882f18 patchbomb: accept default if it is empty string
This fixes Cc: prompt.
2009-10-25 14:28:02 +01:00
Martin Geisler
d0b16ead31 patchbomb: fix double-spaces in prompts 2009-10-25 14:24:39 +01:00
Alexander Solovyov
e3586100e3 fix patchbomb prompt when sending series of patches 2009-10-19 23:27:20 +03:00
Nicolas Dumazet
dcf8dc04b3 patchbomb: add --flag to put flags in subject prefixes
--flag foo uses:
  [PATCH foo]
or
  [PATCH M of N foo]
depending on the number of patches.

Multiple flags are supported: --flag foo --flag bar gives [PATCH foo bar]
2009-07-15 11:26:47 +09:00
Martin Geisler
e1eb1f69ef patchbomb: use a list instead of indented paragraphs 2009-08-03 00:12:10 +02:00
Christian Ebert
7644c068a5 patchbomb: reST syntax for literal blocks in help text 2009-07-31 23:49:47 +02:00
Cédric Duval
21be180306 doc: fix quotes mismatches affecting rst 2009-07-31 01:40:45 +02:00
Martin Geisler
422ad6a339 patchbomb: wrap docstrings at 70 characters 2009-07-26 01:58:13 +02:00
Martin Geisler
61e1c3138f patchbomb: use reST syntax for literal blocks 2009-07-23 00:24:52 +02:00
Martin Geisler
eff9208067 patchbomb: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Cédric Duval
8eebee2964 patchbomb: use local time for the Date: header 2009-07-05 17:09:01 +02:00
Cédric Duval
5287eb35fe patchbomb: fix From_ in the message's envelope
Localized date in the From_ prevents MUAs like mutt from parsing mbox files
generated by patchbomb. Using a 24 characters date in asctime format instead.
2009-07-05 16:42:10 +02:00
Dirkjan Ochtman
c8e6583765 extensions: change descriptions for hook-providing extensions
Thanks to timeless and Dave Townsend for advice!
2009-06-24 13:42:34 +02:00
Dirkjan Ochtman
0448417ea2 extensions: change descriptions for extensions providing a few commands 2009-06-24 13:42:02 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Cédric Duval
0caffe860f help: remove per-extension paragraph on how to enable it
The central place to find this information is the "extensions" help topic.
2009-06-20 20:57:13 +02:00
Cédric Duval
e9c53f7deb patchbomb: do not assume the presence of angle brackets around msg-id
RFC 5322 states:
  "Semantically, the angle bracket characters are not part of the
   msg-id; the msg-id is what is contained between the two angle bracket
   characters."

Hence it should be correct to pass a message Id with no angle brackets
to --in-reply-to. Adding them if missing.
2009-06-17 20:54:26 +02:00
timeless
fb33de67af Generally replace "file name" with "filename" in help and comments. 2009-06-09 09:25:17 -04:00
Sune Foldager
3e254e84d0 Merge with stable 2009-12-08 23:36:06 +01:00
Sune Foldager
772247b8f8 Merge with stable 2009-12-06 23:28:49 +01:00
Marti Raudsepp
7ea70f1f49 patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
Instead of using custom code to split apart addresses, we now use
mail.parseaddrlist() which always does the Right Thing as it relies on Python's
email.Utils.getaddresses().

Previously, 'hg email --to=foo,bar' only respected foo and discarded bar. Also,
commas in names were not allowed in hgrc or the interactive prompt; specifying
'"Lastname, Firstname" <foo>' would confuse patchbomb.

The testcase uses '-m tmp.mbox' because -n (like in other tests) would disable
address mangling.
2009-11-26 12:23:28 +02:00
Dirkjan Ochtman
d99b64b14b patchbomb: don't localize Date headers 2009-05-19 15:10:45 +02:00
Cédric Duval
781163e886 patchbomb: with --in-reply-to, still thread message under first in series
When specifying --in-reply-to for a message M, have
  [M]
    [0/2]
      [1/2]
      [2/2]

instead of
  [M]
    [0/2]
    [1/2]
    [2/2]

which is more consistent with the way messages are being threaded
when --in-reply-to is not used.
2009-05-19 01:37:38 +02:00
Cédric Duval
3d0f59632e patchbomb: minor typo and language fixes 2009-05-19 00:06:19 +02:00
Cédric Duval
67c3c8d092 patchbomb: clarify diffstat usage 2009-05-19 00:02:54 +02:00