{"thread":{"id":"22114","subject":"[StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git","startedAt":"2010-01-07T16:09:32Z","lastAt":"2010-01-08T12:33:32Z","messageCount":5,"participants":["Catalin Marinas","Karl Wiberg"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"131003","messageId":"20100107160932.3226.95737.stgit@pc1117.cambridge.arm.com","threadId":"22114","inReplyTo":null,"subject":"[StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2010-01-07T16:09:32Z","receivedAt":"2010-01-07T16:09:32Z","isPatch":true,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"The new option names are --in-reply-to and --no-thread.\n\nSigned-off-by: Catalin Marinas <catalin.marinas@gmail.com>\n---\n stgit/commands/mail.py |   20 ++++++++++----------\n 1 files changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/stgit/commands/mail.py b/stgit/commands/mail.py\nindex 8ff0bd4..a78c9d2 100644\n--- a/stgit/commands/mail.py\n+++ b/stgit/commands/mail.py\n@@ -56,7 +56,7 @@ specified file (defaulting to '.git/covermail.tmpl' or\n \n All the subsequent e-mails appear as replies to the first e-mail sent\n (either the preamble or the first patch). E-mails can be seen as\n-replies to a different e-mail by using the '--refid' option.\n+replies to a different e-mail by using the '--in-reply-to' option.\n \n SMTP authentication is also possible with '--smtp-user' and\n '--smtp-password' options, also available as configuration settings:\n@@ -107,7 +107,7 @@ options = [\n         short = 'Add BCC to the Bcc: list'),\n     opt('--auto', action = 'store_true',\n         short = 'Automatically cc the patch signers'),\n-    opt('--noreply', action = 'store_true',\n+    opt('--no-thread', action = 'store_true',\n         short = 'Do not send subsequent messages as replies'),\n     opt('--unrelated', action = 'store_true',\n         short = 'Send patches without sequence numbering'),\n@@ -127,7 +127,7 @@ options = [\n         short = 'Edit each patch before sending'),\n     opt('-s', '--sleep', type = 'int', metavar = 'SECONDS',\n         short = 'Sleep for SECONDS between e-mails sending'),\n-    opt('--refid',\n+    opt('--in-reply-to', metavar = 'REFID',\n         short = 'Use REFID as the reference id'),\n     opt('--smtp-server', metavar = 'HOST[:PORT] or \"/path/to/sendmail -t -i\"',\n         short = 'SMTP server or command to use for sending mail'),\n@@ -495,7 +495,7 @@ def __build_cover(tmpl, msg_id, options, patches):\n \n     if not options.git:\n         __build_address_headers(msg, options)\n-    __build_extra_headers(msg, msg_id, options.refid)\n+    __build_extra_headers(msg, msg_id, options.in_reply_to)\n     __encode_message(msg)\n \n     return msg\n@@ -638,11 +638,11 @@ def func(parser, options, args):\n     if total_nr == 0:\n         raise CmdException, 'No patches to send'\n \n-    if options.refid:\n-        if options.noreply or options.unrelated:\n+    if options.in_reply_to:\n+        if options.no_thread or options.unrelated:\n             raise CmdException, \\\n-                  '--refid option not allowed with --noreply or --unrelated'\n-        ref_id = options.refid\n+                  '--in-reply-to option not allowed with --no-thread or --unrelated'\n+        ref_id = options.in_reply_to\n     else:\n         ref_id = None\n \n@@ -663,7 +663,7 @@ def func(parser, options, args):\n         msg_id = __send_message('cover', tmpl, options, patches)\n \n         # subsequent e-mails are seen as replies to the first one\n-        if not options.noreply:\n+        if not options.no_thread:\n             ref_id = msg_id\n \n     # send the patches\n@@ -681,5 +681,5 @@ def func(parser, options, args):\n         msg_id = __send_message('patch', tmpl, options, p, n, total_nr, ref_id)\n \n         # subsequent e-mails are seen as replies to the first one\n-        if not options.noreply and not options.unrelated and not ref_id:\n+        if not options.no_thread and not options.unrelated and not ref_id:\n             ref_id = msg_id\n"},{"id":"131004","messageId":"20100107160937.3226.14811.stgit@pc1117.cambridge.arm.com","threadId":"22114","inReplyTo":"20100107160932.3226.95737.stgit@pc1117.cambridge.arm.com","subject":"[StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2010-01-07T16:09:38Z","receivedAt":"2010-01-07T16:09:38Z","isPatch":true,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>\n---\n stgit/commands/mail.py |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/stgit/commands/mail.py b/stgit/commands/mail.py\nindex a78c9d2..b6f5d8d 100644\n--- a/stgit/commands/mail.py\n+++ b/stgit/commands/mail.py\n@@ -241,6 +241,10 @@ def __send_message_git(msg, options):\n     cmd.append(\"--suppress-cc=self\")\n     if not options.auto:\n         cmd.append(\"--suppress-cc=body\")\n+    if options.in_reply_to:\n+        cmd.append(\"--in-reply-to %s\" % options.in_reply_to)\n+    if options.no_thread:\n+        cmd.append(\"--no-thread\")\n \n     # We only support To/Cc/Bcc in git send-email for now.\n     for x in ['to', 'cc', 'bcc']:\n"},{"id":"131069","messageId":"b8197bcb1001072235ga32ffb7r4ede6eeec1944141@mail.gmail.com","threadId":"22114","inReplyTo":"20100107160932.3226.95737.stgit@pc1117.cambridge.arm.com","subject":"Re: [StGit PATCH 1/2] Rename the mail --refid and --noreply options to match Git","fromName":"Karl Wiberg","fromEmail":"kha@treskal.com","sentAt":"2010-01-08T06:35:06Z","receivedAt":"2010-01-08T06:35:06Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"Looks good.\n\n-- \nKarl Wiberg, kha@treskal.com\n   subrabbit.wordpress.com\n   www.treskal.com/kalle\n"},{"id":"131070","messageId":"b8197bcb1001072243h24e6248er79ac5a8afb6e3782@mail.gmail.com","threadId":"22114","inReplyTo":"20100107160937.3226.14811.stgit@pc1117.cambridge.arm.com","subject":"Re: [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email","fromName":"Karl Wiberg","fromEmail":"kha@treskal.com","sentAt":"2010-01-08T06:43:44Z","receivedAt":"2010-01-08T06:43:44Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On Thu, Jan 7, 2010 at 5:09 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:\n\n> +    if options.in_reply_to:\n> +        cmd.append(\"--in-reply-to %s\" % options.in_reply_to)\n\nHave you tested this? I'm pretty sure you need \"--in-reply-to=%s\", or\nto add the two strings separately---since as far as I can see, this\ncommand is never shell-expanded.\n\n-- \nKarl Wiberg, kha@treskal.com\n   subrabbit.wordpress.com\n   www.treskal.com/kalle\n"},{"id":"131078","messageId":"b0943d9e1001080433o553ffef7jd7d797c4f77da142@mail.gmail.com","threadId":"22114","inReplyTo":"b8197bcb1001072243h24e6248er79ac5a8afb6e3782@mail.gmail.com","subject":"Re: [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2010-01-08T12:33:32Z","receivedAt":"2010-01-08T12:33:32Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"2010/1/8 Karl Wiberg <kha@treskal.com>:\n> On Thu, Jan 7, 2010 at 5:09 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:\n>\n>> +    if options.in_reply_to:\n>> +        cmd.append(\"--in-reply-to %s\" % options.in_reply_to)\n>\n> Have you tested this? I'm pretty sure you need \"--in-reply-to=%s\", or\n> to add the two strings separately---since as far as I can see, this\n> command is never shell-expanded.\n\nI now tested it. I initially had an \"=\" before \"%s\" but dropped it\nbecause git help wasn't clear whether it's needed. See below for an\nupdated patch:\n\n\nPass the --in-reply-to and --no-thread options to git send-email\n\nFrom: Catalin Marinas <catalin.marinas@gmail.com>\n\nSigned-off-by: Catalin Marinas <catalin.marinas@gmail.com>\n---\n stgit/commands/mail.py |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/stgit/commands/mail.py b/stgit/commands/mail.py\nindex a78c9d2..287b6a4 100644\n--- a/stgit/commands/mail.py\n+++ b/stgit/commands/mail.py\n@@ -241,6 +241,10 @@ def __send_message_git(msg, options):\n     cmd.append(\"--suppress-cc=self\")\n     if not options.auto:\n         cmd.append(\"--suppress-cc=body\")\n+    if options.in_reply_to:\n+        cmd.extend([\"--in-reply-to\", options.in_reply_to])\n+    if options.no_thread:\n+        cmd.append(\"--no-thread\")\n\n     # We only support To/Cc/Bcc in git send-email for now.\n     for x in ['to', 'cc', 'bcc']:\n"}]}