From: Darren Hart <dvhart@linux.intel.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 8/8] scripts/send-pull-request: Add CC selectively
Date: Sat, 07 May 2011 09:23:35 -0700 [thread overview]
Message-ID: <1304785415.8085.6.camel@doubt> (raw)
In-Reply-To: <0a674cfa8f7de53b7b75c0213a483aad0276986f.1304754527.git.raj.khem@gmail.com>
On Sat, 2011-05-07 at 00:54 -0700, Khem Raj wrote:
> Currently a consolidated pull request adds all the participants
> to every patch, which in essence is good but might lose focus
> of developers who would be interested to know about the patch
> that developer contributed to. This patch fixes the script by
> extracting the to and cc information from each patch one by one
> and add it to patch mail header instead of doing a sweeping one
> pass over all patches to collect all email addresses. It should
> reduce some email traffic for developers.
This behavior was intentional. If you don't want the CC applied to the
entire series, you can just use git-send-email as this is its behavior.
In particular, it doesn't apply any of the addresses from the patches to
the cover letter, which was my primary objection.
If you would like to modify this patch to apply the entire CC list to
the cover letter, then I think you'll have addressed both of our
concerns and I'll add my Acked-by. As it is, please do not accept this
patch. I will nack it for poky and we don't want the two to diverge.
Please include the primary author/maintainer of sources/recipes/etc. on
CC.
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> scripts/send-pull-request | 51 +++++++++++++++++++++++++-------------------
> 1 files changed, 29 insertions(+), 22 deletions(-)
>
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index 3af2a9f..36a89f4 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -29,24 +29,38 @@ EOM
> # Collect To and CC addresses from the patch files if they exist
> # $1: Which header to add the recipients to, "TO" or "CC"
> # $2: The regex to match and strip from the line with email addresses
> +# $3: The patch which we are preparing to send
> harvest_recipients()
> {
> TO_CC=$1
> REGX=$2
> + PATCH=$3
> export IFS=$',\n'
> - for PATCH in $PDIR/*.patch; do
> - # Grab To addresses
> - for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do
> - if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then
> - if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi
> - elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then
> - if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi
> - fi
> - done
> + # Grab To addresses
> + for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do
> + if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then
> + if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi
> + elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then
> + if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi
> + fi
> done
> unset IFS
> }
>
> +# $1: The given patch
> +create_recipient_lists()
> +{
> + THEPATCH=$1
> + # Harvest emails from the generated patch and populate the TO and CC variables
> + # In addition to To and CC headers/lines, the common Signed-off-by, Tested-by,
> + # etc. (*-by) will be added to CC.
> + if [ $AUTO -eq 1 ]; then
> + harvest_recipients TO "^[Tt][Oo]: *" $THEPATCH
> + harvest_recipients CC "^[Cc][Cc]: *" $THEPATCH
> + harvest_recipients CC "^.*-[Bb][Yy]: *" $THEPATCH
> + fi
> +}
> +
>
> # Parse and verify arguments
> while getopts "af:ghp:t:" OPT; do
> @@ -100,15 +114,6 @@ for TOKEN in SUBJECT BLURB; do
> done
>
>
> -# Harvest emails from the generated patches and populate the TO and CC variables
> -# In addition to To and CC headers/lines, the common Signed-off-by, Tested-by,
> -# etc. (*-by) will be added to CC.
> -if [ $AUTO -eq 1 ]; then
> - harvest_recipients TO "^[Tt][Oo]: *"
> - harvest_recipients CC "^[Cc][Cc]: *"
> - harvest_recipients CC "^.*-[Bb][Yy]: *"
> -fi
> -
> case "$PULL_MTA" in
> git)
> FROM="$(git config sendemail.from)"
> @@ -158,11 +163,12 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
> ERROR=0
> case "$PULL_MTA" in
> git)
> - export IFS=$','
> - GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done)
> - GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done)
> - unset IFS
> for PATCH in $PDIR/*patch; do
> + create_recipient_lists $PATCH
> + export IFS=$','
> + GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done)
> + GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done)
> + unset IFS
> # We harvest the emails manually, so force git not to.
> eval "git send-email $GIT_TO $GIT_CC --no-chain-reply-to --suppress-cc=all $PATCH"
> if [ $? -eq 1 ]; then
> @@ -172,6 +178,7 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
> ;;
> sendmail)
> for PATCH in $PDIR/*patch; do
> + create_recipient_lists $PATCH
> # Insert To and CC headers via formail to keep them separate and
> # appending them to the sendmail command as -- $TO $CC has
> # proven to be an exercise in futility.
--
Darren Hart
Yocto Linux Kernel
next prev parent reply other threads:[~2011-05-07 16:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 7:53 [PATCH 0/8] Misc patches Khem Raj
2011-05-07 7:53 ` [PATCH 1/8] recipes: Replace gconf-dbus with gconf Khem Raj
2011-05-07 7:53 ` [PATCH 2/8] gcc-4.6.0: Apply linaro patches Khem Raj
2011-05-07 7:53 ` [PATCH 3/8] gettext.bbclass, bitbake.conf: Append nls options to EXTRA_OECONF instead of += Khem Raj
2011-05-07 7:53 ` [PATCH 4/8] conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES Khem Raj
2011-05-07 7:53 ` [PATCH 5/8] libgalago_0.5.2.bb: Fix compile for uclibc Khem Raj
2011-05-07 7:53 ` [PATCH 6/8] liburcu_0.5.4.bb: Let it build on uclibc targets Khem Raj
2011-05-07 7:53 ` [PATCH 7/8] lttng-ust_0.12.bb: Fix compilation on uclibc Khem Raj
2011-05-07 7:54 ` [PATCH 8/8] scripts/send-pull-request: Add CC selectively Khem Raj
2011-05-07 16:23 ` Darren Hart [this message]
2011-05-07 17:57 ` Khem Raj
2011-05-09 17:00 ` Darren Hart
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=1304785415.8085.6.camel@doubt \
--to=dvhart@linux.intel.com \
--cc=openembedded-core@lists.openembedded.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