tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: "Kernel.org Tools" <tools@linux.kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: [PATCH b4 2/3] ez: add '--same-thread' option to 'b4 send'
Date: Tue, 21 Feb 2023 20:29:18 -0500	[thread overview]
Message-ID: <20230219-send-iterations-in-same-thread-v1-2-59b802382eb5@gmail.com> (raw)
In-Reply-To: <20230219-send-iterations-in-same-thread-v1-0-59b802382eb5@gmail.com>

The previous commit tweaked get_prep_branch_as_patches to optionnally
send further iterations of a patch series in the same thread as previous
ones.

Expose that functionality to the command line by adding a
'--same-thread' option (defaulting to False) to 'b4 send', and pass it
down to get_prep_branch_as_patches. Document the new feature.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
 b4/command.py             | 2 ++
 b4/ez.py                  | 2 +-
 docs/contributor/send.rst | 5 +++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/b4/command.py b/b4/command.py
index a7a5aa9..21f0d0d 100644
--- a/b4/command.py
+++ b/b4/command.py
@@ -323,6 +323,8 @@ def setup_parser() -> argparse.ArgumentParser:
                          help='Resend a previously sent version of the series')
     sp_send.add_argument('--no-sign', action='store_true', default=False,
                          help='Do not add the cryptographic attestation signature header')
+    sp_send.add_argument('--same-thread', action='store_true', default=False,
+                         help='Keep all versions in the same thread')
     ag_sendh = sp_send.add_argument_group('Web submission', 'Authenticate with the web submission endpoint')
     ag_sendh.add_argument('--web-auth-new', dest='auth_new', action='store_true', default=False,
                           help='Initiate a new web authentication request')
diff --git a/b4/ez.py b/b4/ez.py
index dac5e2a..4013f29 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -1295,7 +1295,7 @@ def cmd_send(cmdargs: argparse.Namespace) -> None:
             sys.exit(1)
 
         try:
-            todests, ccdests, tag_msg, patches = get_prep_branch_as_patches()
+            todests, ccdests, tag_msg, patches = get_prep_branch_as_patches(samethread=cmdargs.same_thread)
         except RuntimeError as ex:
             logger.critical('CRITICAL: Failed to convert range to patches: %s', ex)
             sys.exit(1)
diff --git a/docs/contributor/send.rst b/docs/contributor/send.rst
index bff67aa..6abceac 100644
--- a/docs/contributor/send.rst
+++ b/docs/contributor/send.rst
@@ -233,6 +233,11 @@ Command line flags
 ``--not-me-too``
   Removes your own email address from the recipients.
 
+``--same-thread``
+  When sending a new version of a series, make it part of the same
+  thread as the previous one. The first mail will be sent as a reply
+  to the previous version's cover letter.
+
 ``--no-sign``
   Don't sign your patches with your configured attestation mechanism.
   Note, that patch signing is required for the web submission endpoint,

-- 
2.34.1


  parent reply	other threads:[~2023-02-22  1:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  1:29 [PATCH b4 0/3] ez: allow sending all versions of a patch series in the same thread Philippe Blain
2023-02-22  1:29 ` [PATCH b4 1/3] ez: allow iterations to be sent in a single thread Philippe Blain
2023-02-22  1:29 ` Philippe Blain [this message]
2023-02-22  1:29 ` [PATCH b4 3/3] ez: add 'b4.send-same-thread' config for 'b4 send --same-thread' Philippe Blain
2023-02-22  2:25 ` [PATCH b4 0/3] ez: allow sending all versions of a patch series in the same thread Konstantin Ryabitsev
2023-02-22 17:52   ` Philippe Blain
2023-02-24  1:14 ` [PATCH b4 v2] " Philippe Blain
2023-02-27 21:35 ` [PATCH b4 0/3] " Konstantin Ryabitsev
2023-02-27 21:37   ` Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230219-send-iterations-in-same-thread-v1-2-59b802382eb5@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).