git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git
@ 2010-01-07 16:09 Catalin Marinas
  2010-01-07 16:09 ` [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email Catalin Marinas
  2010-01-08  6:35 ` [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git Karl Wiberg
  0 siblings, 2 replies; 5+ messages in thread
From: Catalin Marinas @ 2010-01-07 16:09 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: git

The new option names are --in-reply-to and --no-thread.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
 stgit/commands/mail.py |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index 8ff0bd4..a78c9d2 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -56,7 +56,7 @@ specified file (defaulting to '.git/covermail.tmpl' or
 
 All the subsequent e-mails appear as replies to the first e-mail sent
 (either the preamble or the first patch). E-mails can be seen as
-replies to a different e-mail by using the '--refid' option.
+replies to a different e-mail by using the '--in-reply-to' option.
 
 SMTP authentication is also possible with '--smtp-user' and
 '--smtp-password' options, also available as configuration settings:
@@ -107,7 +107,7 @@ options = [
         short = 'Add BCC to the Bcc: list'),
     opt('--auto', action = 'store_true',
         short = 'Automatically cc the patch signers'),
-    opt('--noreply', action = 'store_true',
+    opt('--no-thread', action = 'store_true',
         short = 'Do not send subsequent messages as replies'),
     opt('--unrelated', action = 'store_true',
         short = 'Send patches without sequence numbering'),
@@ -127,7 +127,7 @@ options = [
         short = 'Edit each patch before sending'),
     opt('-s', '--sleep', type = 'int', metavar = 'SECONDS',
         short = 'Sleep for SECONDS between e-mails sending'),
-    opt('--refid',
+    opt('--in-reply-to', metavar = 'REFID',
         short = 'Use REFID as the reference id'),
     opt('--smtp-server', metavar = 'HOST[:PORT] or "/path/to/sendmail -t -i"',
         short = 'SMTP server or command to use for sending mail'),
@@ -495,7 +495,7 @@ def __build_cover(tmpl, msg_id, options, patches):
 
     if not options.git:
         __build_address_headers(msg, options)
-    __build_extra_headers(msg, msg_id, options.refid)
+    __build_extra_headers(msg, msg_id, options.in_reply_to)
     __encode_message(msg)
 
     return msg
@@ -638,11 +638,11 @@ def func(parser, options, args):
     if total_nr == 0:
         raise CmdException, 'No patches to send'
 
-    if options.refid:
-        if options.noreply or options.unrelated:
+    if options.in_reply_to:
+        if options.no_thread or options.unrelated:
             raise CmdException, \
-                  '--refid option not allowed with --noreply or --unrelated'
-        ref_id = options.refid
+                  '--in-reply-to option not allowed with --no-thread or --unrelated'
+        ref_id = options.in_reply_to
     else:
         ref_id = None
 
@@ -663,7 +663,7 @@ def func(parser, options, args):
         msg_id = __send_message('cover', tmpl, options, patches)
 
         # subsequent e-mails are seen as replies to the first one
-        if not options.noreply:
+        if not options.no_thread:
             ref_id = msg_id
 
     # send the patches
@@ -681,5 +681,5 @@ def func(parser, options, args):
         msg_id = __send_message('patch', tmpl, options, p, n, total_nr, ref_id)
 
         # subsequent e-mails are seen as replies to the first one
-        if not options.noreply and not options.unrelated and not ref_id:
+        if not options.no_thread and not options.unrelated and not ref_id:
             ref_id = msg_id

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email
  2010-01-07 16:09 [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git Catalin Marinas
@ 2010-01-07 16:09 ` Catalin Marinas
  2010-01-08  6:43   ` Karl Wiberg
  2010-01-08  6:35 ` [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git Karl Wiberg
  1 sibling, 1 reply; 5+ messages in thread
From: Catalin Marinas @ 2010-01-07 16:09 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: git

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
 stgit/commands/mail.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index a78c9d2..b6f5d8d 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -241,6 +241,10 @@ def __send_message_git(msg, options):
     cmd.append("--suppress-cc=self")
     if not options.auto:
         cmd.append("--suppress-cc=body")
+    if options.in_reply_to:
+        cmd.append("--in-reply-to %s" % options.in_reply_to)
+    if options.no_thread:
+        cmd.append("--no-thread")
 
     # We only support To/Cc/Bcc in git send-email for now.
     for x in ['to', 'cc', 'bcc']:

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [StGit PATCH 1/2] Rename the mail --refid and --noreply options  to match Git
  2010-01-07 16:09 [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git Catalin Marinas
  2010-01-07 16:09 ` [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email Catalin Marinas
@ 2010-01-08  6:35 ` Karl Wiberg
  1 sibling, 0 replies; 5+ messages in thread
From: Karl Wiberg @ 2010-01-08  6:35 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Looks good.

-- 
Karl Wiberg, kha@treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options  to git send-email
  2010-01-07 16:09 ` [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email Catalin Marinas
@ 2010-01-08  6:43   ` Karl Wiberg
  2010-01-08 12:33     ` Catalin Marinas
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Wiberg @ 2010-01-08  6:43 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

On Thu, Jan 7, 2010 at 5:09 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:

> +    if options.in_reply_to:
> +        cmd.append("--in-reply-to %s" % options.in_reply_to)

Have you tested this? I'm pretty sure you need "--in-reply-to=%s", or
to add the two strings separately---since as far as I can see, this
command is never shell-expanded.

-- 
Karl Wiberg, kha@treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options  to git send-email
  2010-01-08  6:43   ` Karl Wiberg
@ 2010-01-08 12:33     ` Catalin Marinas
  0 siblings, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2010-01-08 12:33 UTC (permalink / raw)
  To: Karl Wiberg; +Cc: git

2010/1/8 Karl Wiberg <kha@treskal.com>:
> On Thu, Jan 7, 2010 at 5:09 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:
>
>> +    if options.in_reply_to:
>> +        cmd.append("--in-reply-to %s" % options.in_reply_to)
>
> Have you tested this? I'm pretty sure you need "--in-reply-to=%s", or
> to add the two strings separately---since as far as I can see, this
> command is never shell-expanded.

I now tested it. I initially had an "=" before "%s" but dropped it
because git help wasn't clear whether it's needed. See below for an
updated patch:


Pass the --in-reply-to and --no-thread options to git send-email

From: Catalin Marinas <catalin.marinas@gmail.com>

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
 stgit/commands/mail.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index a78c9d2..287b6a4 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -241,6 +241,10 @@ def __send_message_git(msg, options):
     cmd.append("--suppress-cc=self")
     if not options.auto:
         cmd.append("--suppress-cc=body")
+    if options.in_reply_to:
+        cmd.extend(["--in-reply-to", options.in_reply_to])
+    if options.no_thread:
+        cmd.append("--no-thread")

     # We only support To/Cc/Bcc in git send-email for now.
     for x in ['to', 'cc', 'bcc']:

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-08 12:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 16:09 [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git Catalin Marinas
2010-01-07 16:09 ` [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email Catalin Marinas
2010-01-08  6:43   ` Karl Wiberg
2010-01-08 12:33     ` Catalin Marinas
2010-01-08  6:35 ` [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git Karl Wiberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).