unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 58813@debbugs.gnu.org
Cc: ludo@gnu.org, liliana.prikler@gmail.com,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	zimon.toutoune@gmail.com
Subject: bug#58813: [PATCH] doc: Document how to use Patman for patches submission.
Date: Sat, 25 Feb 2023 22:55:14 -0500	[thread overview]
Message-ID: <20230226035515.16214-1-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <87r0yuq615.fsf@gmail.com>

Fixes <https://issues.guix.gnu.org/58813>.

* doc/contributing.texi (Sending a Patch Series): Mention Patman.  Adjust the
examples to no longer showcase broken command substitutions.  Add a section
about how to use Patman, with examples.

---

 doc/contributing.texi | 119 ++++++++++++++++++++++++++++++++++++++----
 doc/guix.texi         |   2 +-
 2 files changed, 110 insertions(+), 11 deletions(-)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index c436bc4a31..2a12dffefe 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1416,12 +1416,19 @@ git config --local sendemail.thread no
 @cindex @code{git format-patch}
 
 @unnumberedsubsubsec Single Patches
-@anchor{Single Patches}
-The @command{git send-email} command is the best way to send both single
-patches and patch series (@pxref{Multiple Patches}) to the Guix mailing
-list.  Sending patches as email attachments may make them difficult to
-review in some mail clients, and @command{git diff} does not store commit
-metadata.
+@cindex patman patch manager
+@cindex patch management, via patman
+@anchor{Single Patches} The @command{git send-email} command is the best
+way to send both single patches and patch series (@pxref{Multiple
+Patches}) to the Guix mailing list.  Sending patches as email
+attachments may make them difficult to review in some mail clients, and
+@command{git diff} does not store commit metadata.  If you want
+something a bit higher level than @command{git send-email} to organize
+your patch submissions and take care of its various options for you, you
+may want to try the @command{patman} command, from the eponymous
+package.  Patman's help can be accessed via @samp{patman -H} or as an
+Info manual after installing the @code{u-boot-documentation} package
+(@pxref{Patman patch manager,,,u-boot,The U-Boot Documentation}).
 
 @quotation Note
 The @command{git send-email} command is provided by the @code{send-email}
@@ -1521,7 +1528,7 @@ that we can send the rest of the patches to.
 @example
 $ git send-email outgoing/0000-cover-letter.patch -a \
       --to=guix-patches@@gnu.org \
-      $(etc/teams.scm cc-members ...)
+      --cc=team-member1@@example.org --cc=team-member2@@example.org ...
 $ rm outgoing/0000-cover-letter.patch # we don't want to resend it!
 @end example
 
@@ -1535,7 +1542,7 @@ can send the actual patches to the newly-created issue address.
 @example
 $ git send-email outgoing/*.patch \
       --to=@var{ISSUE_NUMBER}@@debbugs.gnu.org \
-      $(etc/teams.scm cc-members ...)
+      --cc=team-member1@@example.org --cc=team-member2@@example.org ...
 $ rm -rf outgoing # we don't need these anymore
 @end example
 
@@ -1578,18 +1585,110 @@ You can run the following command to have the @code{Mentors} team put in
 CC of a patch series:
 
 @example
-$ git send-email --to @var{ISSUE_NUMBER}@@debbugs.gnu.org $(./etc/teams.scm cc mentors) *.patch
+$ ./etc/teams.scm cc mentors
 @end example
 
+then note the @var{output} of the script.
+
+@example
+$ git send-email --to @var{ISSUE_NUMBER}@@debbugs.gnu.org @var{output} *.patch
+@end example
+
+Taking care to manually splice the @var{output} of the
+@file{etc/teams.scm} script into the command.
+
 The appropriate team or teams can also be inferred from the modified
 files.  For instance, if you want to send the two latest commits of the
 current Git repository to review, you can run:
 
 @example
 $ guix shell -D guix
-[env]$ git send-email --to @var{ISSUE_NUMBER}@@debbugs.gnu.org $(./etc/teams.scm cc-members HEAD~2 HEAD) *.patch
+[env]$ git send-email --to @var{ISSUE_NUMBER}@@debbugs.gnu.org @var{output} *.patch
 @end example
 
+@cindex patman, usage example
+As manually stitching the output of the @file{etc/teams.scm} script in
+the @command{git send-email} command can get tedious; you may prefer to
+use Patman to automate this for you.  Its necessary basic configuration
+is already found at the root of the Guix repository, in the
+@file{.patman} file.  Another useful bit to have is a default
+destination for the @command{git send-email} command.  You can specify
+it in your repository-local Guix @file{.git/config} file with:
+
+@example
+[sendemail]
+        to = guix-patches@@gnu.org
+@end example
+
+To send a long series to Debbugs, the patches can be written to the
+current directory with:
+
+@example
+patman -n
+@end example
+
+The first patch should then be sent using @samp{git send-email
+0000-cover-letter.patch}, as explained earlier (@pxref{Multiple
+Patches}).
+
+After Debbugs has issued a unique bug email in reply to that initial
+patch submission, e.g. @email{NNNNN@@debbugs.gnu.org}, you can save this
+information into the top commit of your patch series (it doesn't matter
+which, but it's more convenient to amend it later when it's at the top)
+like so, via the Patman-specific @code{Series-to} git message tag:
+
+@example
+gnu: Add foo.
+
+* gnu/packages/dummy.scm: Add foo.
+
+Series-to: NNNNN@@debbugs.gnu.org
+@end example
+
+You can then send your series to that address with the right people
+automatically added in CC by simply issuing:
+
+@example
+patman
+@end example
+
+After addressing the first round of review comments, you can annotate a
+v2 patch series by adding these Patman-specific git message tags:
+
+@example
+gnu: Add foo.
+
+* gnu/packages/dummy.scm: Add foo.
+
+Series-to: NNNNN@@debbugs.gnu.org
+Series-version: 2
+Series-changes: 2
+- Factorized X into Y and Z
+
+@end example
+
+The @command{patman} command will then take care to automate the right
+@code{git send-email} command and produce patch annotations useful for
+the reviewers.
+
+After the review is complete, if you are the one merging your own
+changes, you should take care to strip any Patman git message tags.
+This can be done by writing the patches to the current directory with:
+
+@example
+patman -n
+@end example
+
+and then applying them to the main branch with:
+
+@example
+git am *.patch
+@end example
+
+For more information, run @samp{patman -H} or read its info manual,
+which can be installed with the @code{u-boot-documentation} package
+(@pxref{Patman patch manager,,,u-boot,The U-Boot Documentation}).
+
 @node Tracking Bugs and Patches
 @section Tracking Bugs and Patches
 
diff --git a/doc/guix.texi b/doc/guix.texi
index a7ef00f421..5a4900d7cf 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -49,7 +49,7 @@ Copyright @copyright{} 2017 humanitiesNerd@*
 Copyright @copyright{} 2017, 2021 Christine Lemmer-Webber@*
 Copyright @copyright{} 2017, 2018, 2019, 2020, 2021, 2022 Marius Bakke@*
 Copyright @copyright{} 2017, 2019, 2020, 2022 Hartmut Goebel@*
-Copyright @copyright{} 2017, 2019, 2020, 2021, 2022 Maxim Cournoyer@*
+Copyright @copyright{} 2017, 2019, 2020, 2021, 2022, 2023 Maxim Cournoyer@*
 Copyright @copyright{} 2017–2022 Tobias Geerinckx-Rice@*
 Copyright @copyright{} 2017 George Clemmer@*
 Copyright @copyright{} 2017 Andy Wingo@*

base-commit: 9a2cf9ef0a9ece9aa0dcb24a31fe0c313d06988f
-- 
2.39.1





  parent reply	other threads:[~2023-02-26  4:37 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  3:50 bug#58813: can't substitute etc/teams.scm command as doc suggests Maxim Cournoyer
2022-10-27  6:08 ` Liliana Marie Prikler
2022-10-27 12:40   ` Maxim Cournoyer
2022-10-27 16:27     ` Liliana Marie Prikler
2023-02-26  3:55 ` Maxim Cournoyer [this message]
2023-02-26  8:25   ` bug#58813: [PATCH] doc: Document how to use Patman for patches submission Liliana Marie Prikler
2023-02-26 17:11     ` Maxim Cournoyer
2023-02-27  0:45       ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-02-27 16:43         ` Maxim Cournoyer
2023-03-03  9:54   ` Ludovic Courtès
2023-03-03 17:26     ` Liliana Marie Prikler
2023-03-06 14:53       ` bug#58813: ‘guix style’ flaws Ludovic Courtès
2023-03-06 17:42         ` Maxim Cournoyer
2023-03-07  1:07     ` bug#58813: [PATCH] doc: Document how to use Patman for patches submission Maxim Cournoyer
2023-03-10  9:01       ` Ludovic Courtès
2023-03-10 14:07         ` Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 0/5] Fix teams.scm by use of a new --header-cmd git send-email option Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 1/5] gnu: git: Apply patch adding the --header-cmd feature Maxim Cournoyer
2023-04-23 17:00             ` Liliana Marie Prikler
2023-04-24  0:46               ` Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 2/5] teams: Add 'cc-members-header-cmd' action Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 3/5] teams: Add a configure-git action Maxim Cournoyer
2023-04-23 17:03             ` Liliana Marie Prikler
2023-04-24  0:59               ` Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 0/5] Fix teams.scm by use of a new --header-cmd git send-email option Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 1/5] gnu: git: Apply patch adding the --header-cmd feature Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 2/5] teams: Add 'cc-members-header-cmd' action Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 3/5] Makefile.am: Auto-configure Git on 'make' Maxim Cournoyer
2023-04-24  4:22                 ` Liliana Marie Prikler
2023-04-24 12:37                   ` Maxim Cournoyer
2023-04-28 14:28                 ` Josselin Poiret via Bug reports for GNU Guix
2023-05-01 16:38                   ` bug#58813: can't substitute etc/teams.scm command as doc suggests Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 4/5] teams: Add a 'cc-mentors-header-cmd' action Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 5/5] doc: Simplify contributing section by automating git configuration Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 4/5] teams: Add a 'cc-mentors-header-cmd' action Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 5/5] doc: Simplify contributing section by automating git configuration Maxim Cournoyer
2023-03-07 11:35 ` bug#58813: [PATCH v2] doc: Document how to use Patman for patches submission Simon Tournier
2023-03-07 16:46   ` Maxim Cournoyer
2023-03-07 17:39     ` Simon Tournier
2023-03-08  5:29       ` Liliana Marie Prikler
2023-03-08  8:47         ` Simon Tournier
2023-03-08 16:26           ` Maxim Cournoyer
2023-03-08 17:05             ` Simon Tournier

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20230226035515.16214-1-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=58813@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=ludo@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).