All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] *-pull-request: cleanup and overhaul
@ 2011-05-13 23:35 Darren Hart
  2011-05-13 23:36 ` [RFC PATCH 01/10] create-pull-request: alphabetize arguments Darren Hart
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:35 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Jansa, Koen Kooi, Paul Eggleton

After some discussion on the oe-core list regarding the *-pull-request scripts
I provided a proposal, received some feedback, and these patches are the result
of that discussion. The Cc list varies from patch to patch a bit more wildly
than is typical as a final sanity test, although it does reflect who commented
and expressed interest in which parts of the overhaul.

Please review the following changes for suitability for inclusion. If you have
any objections or suggestions for improvement, please respond to the patches. If
you agree with the changes, please provide your Acked-by.

The following changes since commit 65e5ebc1d27b0a6cb2e33596d6d32c536b857f0d:

  tcmode-default: fix a typo (2011-05-13 11:02:20 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib.git dvhart/git-pull
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/git-pull

Darren Hart (10):
  create-pull-request: alphabetize arguments
  create-pull-request: whitespace cleanup
  create-pull-request: use git request-pull and arbitrary remotes
  create-pull-request: rewrite known private URLs to public URLs
  create-pull-request: provide an RFC mode via -c argument
  send-pull-request: whitespace cleanup
  send-pull-request: remove local mta support
  send-pull-request: fix greedy auto-cc regex
  send-pull-request: don't send all patches to everyone even with -a
  send-pull-request: verify git sendemail config

 scripts/create-pull-request |  176 +++++++++++++++++++----------
 scripts/send-pull-request   |  265 ++++++++++++++++++-------------------------
 2 files changed, 228 insertions(+), 213 deletions(-)




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

* [RFC PATCH 01/10] create-pull-request: alphabetize arguments
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
@ 2011-05-13 23:36 ` Darren Hart
  2011-05-13 23:36 ` [RFC PATCH 02/10] create-pull-request: whitespace cleanup Darren Hart
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:36 UTC (permalink / raw)
  To: openembedded-core

Some initial cleanup prior to a significant overhaul.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 scripts/create-pull-request |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 5ad7666..225a89a 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -9,14 +9,14 @@ usage() {
 CMD=$(basename $0)
 cat <<EOM
 Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -b contrib_branch
+  -b contrib_branch   Branch-name in the git.pokylinux.org/poky-contrib tree
   -h                  Display this help message
-  -o output_dir       Specify the output directory for the messages (default: pull-PID)
+  -i commit_id        Ending commit (default: HEAD)
   -m msg_body_file    The file containing a blurb to be inserted into the summary email
+  -o output_dir       Specify the output directory for the messages (default: pull-PID)
+  -p prefix           Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
   -r relative_to      Starting commit (default: master)
-  -i commit_id        Ending commit (default: HEAD)
-  -b contrib_branch   Branch-name in the git.pokylinux.org/poky-contrib tree
   -s subject          The subject to be inserted into the summary email
-  -p prefix           Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
 
  Examples:
    $CMD -b nitin/basic
@@ -27,7 +27,7 @@ EOM
 }
 
 # Parse and validate arguments
-while getopts "b:hi:m:o:r:s:p:" OPT; do
+while getopts "b:hi:m:o:p:r:s:" OPT; do
     case $OPT in
     b)
         CONTRIB_BRANCH="$OPTARG"
-- 
1.7.1




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

* [RFC PATCH 02/10] create-pull-request: whitespace cleanup
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
  2011-05-13 23:36 ` [RFC PATCH 01/10] create-pull-request: alphabetize arguments Darren Hart
@ 2011-05-13 23:36 ` Darren Hart
  2011-05-13 23:37 ` [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes Darren Hart
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:36 UTC (permalink / raw)
  To: openembedded-core

Indent with tabs, not spaces, to be consistent with other bash scripts.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 scripts/create-pull-request |   78 +++++++++++++++++++++---------------------
 1 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 225a89a..b7e015a 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -28,42 +28,42 @@ EOM
 
 # Parse and validate arguments
 while getopts "b:hi:m:o:p:r:s:" OPT; do
-    case $OPT in
-    b)
-        CONTRIB_BRANCH="$OPTARG"
-        ;;
-    h)
-        usage
-        exit 0
-        ;;
-    i)
-        COMMIT_ID="$OPTARG"
-        ;;
-    m)
-        BODY="$OPTARG"
-        if [ ! -e "$BODY" ]; then
-            echo "ERROR: Body file does not exist"
-            exit 1
-        fi
-        ;;
-    o)
-        ODIR="$OPTARG"
-        ;;
-    p)
-        PREFIX="$OPTARG"
-        ;;
-    r)
-        RELATIVE_TO="$OPTARG"
-        ;;
-    s)
-        SUBJECT="$OPTARG"
-        ;;
-    esac
+	case $OPT in
+	b)
+		CONTRIB_BRANCH="$OPTARG"
+		;;
+	h)
+		usage
+		exit 0
+		;;
+	i)
+		COMMIT_ID="$OPTARG"
+		;;
+	m)
+		BODY="$OPTARG"
+		if [ ! -e "$BODY" ]; then
+			echo "ERROR: Body file does not exist"
+			exit 1
+		fi
+		;;
+	o)
+		ODIR="$OPTARG"
+		;;
+	p)
+		PREFIX="$OPTARG"
+		;;
+	r)
+		RELATIVE_TO="$OPTARG"
+		;;
+	s)
+		SUBJECT="$OPTARG"
+		;;
+	esac
 done
 
 if [ -z "$CONTRIB_BRANCH" ]; then
-    usage
-    exit 1
+	usage
+	exit 1
 fi
 
 
@@ -72,9 +72,9 @@ fi
 WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$CONTRIB_BRANCH"
 wget -q $WEB_URL -O /dev/null
 if [ $? -ne 0 ]; then
-    echo "WARNING: Branch '$CONTRIB_BRANCH' was not found on the contrib git tree."
-    echo "         Please check your contrib-branch parameter before sending."
-    echo ""
+	echo "WARNING: Branch '$CONTRIB_BRANCH' was not found on the contrib git tree."
+	echo "         Please check your contrib-branch parameter before sending."
+	echo ""
 fi
 
 if [ -e $ODIR ]; then
@@ -106,13 +106,13 @@ EOM
 # If the user specified a message body, insert it into the cover letter and
 # remove the BLURB token.
 if [ -n "$BODY" ]; then
-    sed -i "/BLURB HERE/ r $BODY" "$CL"
-    sed -i "/BLURB HERE/ d" "$CL"
+	sed -i "/BLURB HERE/ r $BODY" "$CL"
+	sed -i "/BLURB HERE/ d" "$CL"
 fi
 
 # If the user specified a subject, replace the SUBJECT token with it.
 if [ -n "$SUBJECT" ]; then
-    sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL"
+	sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL"
 fi
 
 
-- 
1.7.1




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

* [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
  2011-05-13 23:36 ` [RFC PATCH 01/10] create-pull-request: alphabetize arguments Darren Hart
  2011-05-13 23:36 ` [RFC PATCH 02/10] create-pull-request: whitespace cleanup Darren Hart
@ 2011-05-13 23:37 ` Darren Hart
  2011-05-14  0:14   ` Joshua Lock
  2011-05-13 23:37 ` [RFC PATCH 04/10] create-pull-request: rewrite known private URLs to public URLs Darren Hart
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Jansa

Allow for arbitrary remotes via a new -u argument. Remove the hard coded
references to the pokylinux repositories. Create the WEB_URL from known
remotes. Future patches can add additional WEB_URL mappings for remotes
like Git Hub, Gitorious, and kernel.org.

Rather than duplicating the git request-pull command ourselves, just use
the existing one.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Rini <tom_rini@mentor.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/create-pull-request |   74 ++++++++++++++++++++++++++++--------------
 1 files changed, 49 insertions(+), 25 deletions(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index b7e015a..c6cf817 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -2,14 +2,13 @@
 ODIR=pull-$$
 RELATIVE_TO="master"
 COMMIT_ID="HEAD"
-PULL_URL="git://git.pokylinux.org/poky-contrib.git"
 PREFIX="PATCH"
 
 usage() {
 CMD=$(basename $0)
 cat <<EOM
-Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -b contrib_branch
-  -b contrib_branch   Branch-name in the git.pokylinux.org/poky-contrib tree
+Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote -b branch
+  -b branch           Branch name in the specified remote
   -h                  Display this help message
   -i commit_id        Ending commit (default: HEAD)
   -m msg_body_file    The file containing a blurb to be inserted into the summary email
@@ -17,20 +16,21 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
   -p prefix           Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
   -r relative_to      Starting commit (default: master)
   -s subject          The subject to be inserted into the summary email
+  -u remote           The git remote where the branch is located
 
  Examples:
-   $CMD -b nitin/basic
-   $CMD -r distro/master -i nitin/distro -b nitin/distro
-   $CMD -r master -i misc -b nitin/misc -o pull-misc
-   $CMD -p "RFC PATCH" -b nitin/experimental
+   $CMD -u contrib -b nitin/basic
+   $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro
+   $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
+   $CMD -u contrib -p "RFC PATCH" -b nitin/experimental
 EOM
 }
 
 # Parse and validate arguments
-while getopts "b:hi:m:o:p:r:s:" OPT; do
+while getopts "b:hi:m:o:p:r:s:u:" OPT; do
 	case $OPT in
 	b)
-		CONTRIB_BRANCH="$OPTARG"
+		BRANCH="$OPTARG"
 		;;
 	h)
 		usage
@@ -58,23 +58,42 @@ while getopts "b:hi:m:o:p:r:s:" OPT; do
 	s)
 		SUBJECT="$OPTARG"
 		;;
+	u)
+		REMOTE="$OPTARG"
+		REMOTE_URL=$(git config remote.$REMOTE.url)
+		if [ $? -ne 0 ]; then
+			echo "ERROR: git config failed to find a url for '$REMOTE'"
+			exit 1
+		fi
+		;;
 	esac
 done
 
-if [ -z "$CONTRIB_BRANCH" ]; then
+if [ -z "$BRANCH" ] || [ -z "$REMOTE_URL" ]; then
 	usage
 	exit 1
 fi
 
 
+# Set WEB_URL from known remotes
+case "$REMOTE_URL" in
+	*git.yoctoproject.org*)
+		WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
+		;;
+	*git.pokylinux.org*)
+		WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
+		;;
+esac
+
 # Perform a sanity test on the web URL. Issue a warning if it is not
 # accessible, but do not abort as users may want to run offline.
-WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$CONTRIB_BRANCH"
-wget -q $WEB_URL -O /dev/null
-if [ $? -ne 0 ]; then
-	echo "WARNING: Branch '$CONTRIB_BRANCH' was not found on the contrib git tree."
-	echo "         Please check your contrib-branch parameter before sending."
-	echo ""
+if [ -n "$WEB_URL" ]; then
+	wget -q $WEB_URL -O /dev/null
+	if [ $? -ne 0 ]; then
+		echo "WARNING: Branch '$BRANCH' was not found on the contrib git tree."
+		echo "         Please check your remote and branch parameter before sending."
+		echo ""
+	fi
 fi
 
 if [ -e $ODIR ]; then
@@ -90,18 +109,23 @@ git format-patch -M --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --co
 
 # Customize the cover letter
 CL="$ODIR/0000-cover-letter.patch"
-(cat <<EOM
+PM="$ODIR/pull-msg"
+git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID > "$PM"
+if [ $? -ne 0 ]; then
+	echo "ERROR: git request-pull reported an error"
+	exit 1
+fi
 
-Pull URL: $PULL_URL
-  Branch: $CONTRIB_BRANCH
-  Browse: $WEB_URL
+# The cover letter already has a diffstat, remove it from the pull-msg
+# before inserting it.
+sed -n "0,\#$REMOTE_URL# p" "$PM" | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
+rm "$PM"
 
-Thanks,
-    $(git config user.name) <$(git config user.email)>
----
+# Insert the WEB_URL if there is one
+if [ -n "$WEB_URL" ]; then
+	echo "  $WEB_URL" | sed -i "\#$REMOTE_URL# r /dev/stdin" "$CL"
+fi
 
-EOM
-) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
 
 # If the user specified a message body, insert it into the cover letter and
 # remove the BLURB token.
-- 
1.7.1




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

* [RFC PATCH 04/10] create-pull-request: rewrite known private URLs to public URLs
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (2 preceding siblings ...)
  2011-05-13 23:37 ` [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes Darren Hart
@ 2011-05-13 23:37 ` Darren Hart
  2011-05-13 23:37 ` [RFC PATCH 05/10] create-pull-request: provide an RFC mode via -c argument Darren Hart
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Jansa

Rather than requiring users to have public remotes and private remotes when
their development remotes are ssh based (and therefor unsuitable for a pull
request URL), rewrite the ones we know about from ssh://git@ to git://.

With this infrastructure in place, future patches can augment the list of
known remotes for things like Git Hub, Gitorious, kernel.org, etc.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Rini <tom_rini@mentor.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/create-pull-request |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index c6cf817..96cf04f 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -65,6 +65,16 @@ while getopts "b:hi:m:o:p:r:s:u:" OPT; do
 			echo "ERROR: git config failed to find a url for '$REMOTE'"
 			exit 1
 		fi
+
+		# Rewrite known private URLs to public URLs
+		case "$REMOTE_URL" in
+		*ssh://git@git.pokylinux.org*)
+			REMOTE_URL=${REMOTE_URL/'ssh://git@'/'git://'}
+			;;
+		*ssh://git@git.yoctoproject.org*)
+			REMOTE_URL=${REMOTE_URL/"ssh://git@"/"git://"}
+			;;
+		esac
 		;;
 	esac
 done
-- 
1.7.1




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

* [RFC PATCH 05/10] create-pull-request: provide an RFC mode via -c argument
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (3 preceding siblings ...)
  2011-05-13 23:37 ` [RFC PATCH 04/10] create-pull-request: rewrite known private URLs to public URLs Darren Hart
@ 2011-05-13 23:37 ` Darren Hart
  2011-05-13 23:37 ` [RFC PATCH 06/10] send-pull-request: whitespace cleanup Darren Hart
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: Paul Eggleton

Currently it is difficult to know if a pull request is being sent for review
or just to be pulled.

Add a -c argument to add RFC to the subject prefix and a blurb requesting
review to the cover letter.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Saul Wold <sgw@linux.intel.com>
Cc: Paul Eggleton <paul.eggleton@intel.com>
Cc: Joshua Lock <josh@linux.intel.com>
---
 scripts/create-pull-request |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 96cf04f..43a4b74 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -3,12 +3,14 @@ ODIR=pull-$$
 RELATIVE_TO="master"
 COMMIT_ID="HEAD"
 PREFIX="PATCH"
+RFC=0
 
 usage() {
 CMD=$(basename $0)
 cat <<EOM
 Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote -b branch
   -b branch           Branch name in the specified remote
+  -c                  Create an RFC (Request for Comment) patch series
   -h                  Display this help message
   -i commit_id        Ending commit (default: HEAD)
   -m msg_body_file    The file containing a blurb to be inserted into the summary email
@@ -27,11 +29,14 @@ EOM
 }
 
 # Parse and validate arguments
-while getopts "b:hi:m:o:p:r:s:u:" OPT; do
+while getopts "b:chi:m:o:p:r:s:u:" OPT; do
 	case $OPT in
 	b)
 		BRANCH="$OPTARG"
 		;;
+	c)
+		RFC=1
+		;;
 	h)
 		usage
 		exit 0
@@ -84,6 +89,10 @@ if [ -z "$BRANCH" ] || [ -z "$REMOTE_URL" ]; then
 	exit 1
 fi
 
+if [ $RFC -eq 1 ]; then
+	PREFIX="RFC $PREFIX"
+fi
+
 
 # Set WEB_URL from known remotes
 case "$REMOTE_URL" in
@@ -120,7 +129,7 @@ git format-patch -M --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --co
 # Customize the cover letter
 CL="$ODIR/0000-cover-letter.patch"
 PM="$ODIR/pull-msg"
-git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID > "$PM"
+git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"
 if [ $? -ne 0 ]; then
 	echo "ERROR: git request-pull reported an error"
 	exit 1
@@ -131,6 +140,17 @@ fi
 sed -n "0,\#$REMOTE_URL# p" "$PM" | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
 rm "$PM"
 
+# If this is an RFC, make that clear in the cover letter
+if [ $RFC -eq 1 ]; then
+(cat <<EOM
+Please review the following changes for suitability for inclusion. If you have
+any objections or suggestions for improvement, please respond to the patches. If
+you agree with the changes, please provide your Acked-by.
+
+EOM
+) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
+fi
+
 # Insert the WEB_URL if there is one
 if [ -n "$WEB_URL" ]; then
 	echo "  $WEB_URL" | sed -i "\#$REMOTE_URL# r /dev/stdin" "$CL"
-- 
1.7.1




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

* [RFC PATCH 06/10] send-pull-request: whitespace cleanup
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (4 preceding siblings ...)
  2011-05-13 23:37 ` [RFC PATCH 05/10] create-pull-request: provide an RFC mode via -c argument Darren Hart
@ 2011-05-13 23:37 ` Darren Hart
  2011-05-13 23:38 ` [RFC PATCH 07/10] send-pull-request: remove local mta support Darren Hart
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:37 UTC (permalink / raw)
  To: openembedded-core

Indent with tabs, not spaces, for consistency with other bash scripts.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 scripts/send-pull-request |  250 ++++++++++++++++++++++----------------------
 1 files changed, 125 insertions(+), 125 deletions(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 3af2a9f..76dd7a2 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -31,72 +31,72 @@ EOM
 # $2: The regex to match and strip from the line with email addresses
 harvest_recipients()
 {
-    TO_CC=$1
-    REGX=$2
-    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
-    done
-    unset IFS
+	TO_CC=$1
+	REGX=$2
+	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
+	done
+	unset IFS
 }
 
 
 # Parse and verify arguments
 while getopts "af:ghp:t:" OPT; do
-    case $OPT in
-        a)
-            AUTO=1
-            ;;
-        f)
-            FROM="$OPTARG"
-            ;;
-        g)
-            PULL_MTA="git"
-            ;;
-        h)
-            usage
-            exit 0
-            ;;
-        p)
-            PDIR=${OPTARG%/}
-            if [ ! -d $PDIR ]; then
-                echo "ERROR: pull-dir \"$PDIR\" does not exist."
-                usage
-                exit 1
-            fi
-            ;;
-        t)
-            if [ -n "$TO" ]; then
-                TO="$TO,$OPTARG"
-            else
-                TO="$OPTARG"
-            fi
-            ;;
-    esac
+	case $OPT in
+	a)
+		AUTO=1
+		;;
+	f)
+		FROM="$OPTARG"
+		;;
+	g)
+		PULL_MTA="git"
+		;;
+	h)
+		usage
+		exit 0
+		;;
+	p)
+		PDIR=${OPTARG%/}
+		if [ ! -d $PDIR ]; then
+			echo "ERROR: pull-dir \"$PDIR\" does not exist."
+			usage
+			exit 1
+		fi
+		;;
+	t)
+		if [ -n "$TO" ]; then
+			TO="$TO,$OPTARG"
+		else
+			TO="$OPTARG"
+		fi
+		;;
+	esac
 done
 
 if [ -z "$PDIR" ]; then
-    echo "ERROR: you must specify a pull-dir."
-    usage
-    exit 1
+	echo "ERROR: you must specify a pull-dir."
+	usage
+	exit 1
 fi
 
 
 # Verify the cover letter is complete and free of tokens
 CL="$PDIR/0000-cover-letter.patch"
 for TOKEN in SUBJECT BLURB; do
-    grep -q "*** $TOKEN HERE ***" "$CL"
-    if [ $? -eq 0 ]; then
-        echo "ERROR: Please edit $CL and try again (Look for '*** $TOKEN HERE ***')."
-        exit 1
-    fi
+	grep -q "*** $TOKEN HERE ***" "$CL"
+	if [ $? -eq 0 ]; then
+		echo "ERROR: Please edit $CL and try again (Look for '*** $TOKEN HERE ***')."
+		exit 1
+	fi
 done
 
 
@@ -104,39 +104,39 @@ done
 # 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]: *"
+	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)"
+git)
+	FROM="$(git config sendemail.from)"
 	AUTO_TO="$(git config sendemail.to)"
 	if [ -n "$AUTO_TO" ]; then
-	    if [ -n "$TO" ]; then
-		TO="$TO,$AUTO_TO"
-	    else
-		TO="$AUTO_TO"
-	    fi
+		if [ -n "$TO" ]; then
+			TO="$TO,$AUTO_TO"
+		else
+			TO="$AUTO_TO"
+		fi
+	fi
+	;;
+sendmail)
+	if [ -z "$FROM" ]; then
+		FROM="$(git config user.name) <$(git config user.email)>"
+		if [ -z "$FROM" ]; then
+			echo "ERROR: unable to determine a FROM address"
+			usage
+			exit 1
+		fi
 	fi
-        ;;
-    sendmail)
-        if [ -z "$FROM" ]; then
-            FROM="$(git config user.name) <$(git config user.email)>"
-            if [ -z "$FROM" ]; then
-                echo "ERROR: unable to determine a FROM address"
-                usage
-                exit 1
-            fi
-        fi
-        ;;
+	;;
 esac
 
 if [ -z "$TO" ] && [ -z "$CC" ]; then
-    echo "ERROR: you have not specified any recipients."
-    usage
-    exit 1
+	echo "ERROR: you have not specified any recipients."
+	usage
+	exit 1
 fi
 
 
@@ -155,55 +155,55 @@ echo "Continue? [y/N] "
 read cont
 
 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
-                # 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
-                    ERROR=1
-                fi
-            done
-            ;;
-        sendmail)
-            for PATCH in $PDIR/*patch; do
-                # 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.
-                #
-                # Clear the From header, leaving it up to sendmail to insert an
-                # appropriate one. Insert the original sender (per git) into the
-                # body of the message.
-                #
-                # Use tail to remove the email envelope from git or formail as
-                # msmtp (sendmail) would choke on them.
-                #
-                # Modify the patch date for sequential delivery, but retain the
-                # original date as "Old-Date".
-                DATE=$(date +"%a, %d %b %Y %k:%M:%S %z")
-                GIT_FROM=$(cat $PATCH | formail -X "From:")
-                cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -I "From: $FROM" -i "Date: $DATE" | sed "0,/^$/s/^$/\n$GIT_FROM\n/" | tail -n +2 | sendmail -t
-                if [ $? -eq 1 ]; then
-                    ERROR=1
-                fi
-            done
-            ;;
-        *)
-            echo "ERROR: unknown MTA: $PULL_MTA"
-            usage
-            exit 1
-            ;;
-    esac
-
-    if [ $ERROR -eq 1 ]; then
-        echo "ERROR: Failed to send one or more messages. Check your MTA log for details."
-    fi
+	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
+			# 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
+				ERROR=1
+			fi
+		done
+		;;
+	sendmail)
+		for PATCH in $PDIR/*patch; do
+			# 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.
+			#
+			# Clear the From header, leaving it up to sendmail to insert an
+			# appropriate one. Insert the original sender (per git) into the
+			# body of the message.
+			#
+			# Use tail to remove the email envelope from git or formail as
+			# msmtp (sendmail) would choke on them.
+			#
+			# Modify the patch date for sequential delivery, but retain the
+			# original date as "Old-Date".
+			DATE=$(date +"%a, %d %b %Y %k:%M:%S %z")
+			GIT_FROM=$(cat $PATCH | formail -X "From:")
+			cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -I "From: $FROM" -i "Date: $DATE" | sed "0,/^$/s/^$/\n$GIT_FROM\n/" | tail -n +2 | sendmail -t
+			if [ $? -eq 1 ]; then
+				ERROR=1
+			fi
+		done
+		;;
+	*)
+		echo "ERROR: unknown MTA: $PULL_MTA"
+		usage
+		exit 1
+		;;
+	esac
+
+	if [ $ERROR -eq 1 ]; then
+		echo "ERROR: Failed to send one or more messages. Check your MTA log for details."
+	fi
 else
-    echo "Send aborted."
+	echo "Send aborted."
 fi
 
-- 
1.7.1




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

* [RFC PATCH 07/10] send-pull-request: remove local mta support
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (5 preceding siblings ...)
  2011-05-13 23:37 ` [RFC PATCH 06/10] send-pull-request: whitespace cleanup Darren Hart
@ 2011-05-13 23:38 ` Darren Hart
  2011-05-13 23:38 ` [RFC PATCH 08/10] send-pull-request: fix greedy auto-cc regex Darren Hart
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:38 UTC (permalink / raw)
  To: openembedded-core

There is no real value in supporting sendmail directly when git
can be configured to use it. The script used to generate the
pull request mails relies heavily on git, so doing so here does
not impose any additional dependencies and it greatly reduces the
complexity of this script.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 scripts/send-pull-request |  108 +++++++++------------------------------------
 1 files changed, 21 insertions(+), 87 deletions(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 76dd7a2..d265c47 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -1,15 +1,9 @@
 #!/bin/bash
 AUTO=0
 
-# Check env for any default settings, command line options will override these.
-if [ -z "$PULL_MTA" ]; then
-    PULL_MTA="sendmail"
-fi
-
 # Prevent environment leakage to these vars.
 unset TO
 unset CC
-# allow the user to set FROM in the environment
 
 usage()
 {
@@ -18,10 +12,6 @@ Usage: $(basename $0) [-h] [-a] [[-t email]...] -p pull-dir
   -t email     Explicitly add email to the recipients
   -a           Automatically harvest recipients from "*-by: email" lines
                in the patches in the pull-dir
-  -f           Specify a FROM address, you can also use the FROM environment
-               variable. If you do not specify one, it will try to use the one
-               from your git config. This is ignored if -g is used.
-  -g           Use git-send-email to send mail instead of sendmail
   -p pull-dir  Directory containing summary and patch files
 EOM
 }
@@ -49,17 +39,11 @@ harvest_recipients()
 
 
 # Parse and verify arguments
-while getopts "af:ghp:t:" OPT; do
+while getopts "ahp:t:" OPT; do
 	case $OPT in
 	a)
 		AUTO=1
 		;;
-	f)
-		FROM="$OPTARG"
-		;;
-	g)
-		PULL_MTA="git"
-		;;
 	h)
 		usage
 		exit 0
@@ -109,29 +93,14 @@ if [ $AUTO -eq 1 ]; then
 	harvest_recipients CC "^.*-[Bb][Yy]: *"
 fi
 
-case "$PULL_MTA" in
-git)
-	FROM="$(git config sendemail.from)"
-	AUTO_TO="$(git config sendemail.to)"
-	if [ -n "$AUTO_TO" ]; then
-		if [ -n "$TO" ]; then
-			TO="$TO,$AUTO_TO"
-		else
-			TO="$AUTO_TO"
-		fi
+AUTO_TO="$(git config sendemail.to)"
+if [ -n "$AUTO_TO" ]; then
+	if [ -n "$TO" ]; then
+		TO="$TO,$AUTO_TO"
+	else
+		TO="$AUTO_TO"
 	fi
-	;;
-sendmail)
-	if [ -z "$FROM" ]; then
-		FROM="$(git config user.name) <$(git config user.email)>"
-		if [ -z "$FROM" ]; then
-			echo "ERROR: unable to determine a FROM address"
-			usage
-			exit 1
-		fi
-	fi
-	;;
-esac
+fi
 
 if [ -z "$TO" ] && [ -z "$CC" ]; then
 	echo "ERROR: you have not specified any recipients."
@@ -145,10 +114,7 @@ cat <<EOM
 The following patches:
 $(for PATCH in $PDIR/*.patch; do echo "    $PATCH"; done)
 
-will be sent with the following headers:
-  From: $FROM
-    To: $TO
-    CC: $CC
+will now be sent via the git send-email command.
 
 EOM
 echo "Continue? [y/N] "
@@ -156,52 +122,20 @@ read cont
 
 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
-			# 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
-				ERROR=1
-			fi
-		done
-		;;
-	sendmail)
-		for PATCH in $PDIR/*patch; do
-			# 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.
-			#
-			# Clear the From header, leaving it up to sendmail to insert an
-			# appropriate one. Insert the original sender (per git) into the
-			# body of the message.
-			#
-			# Use tail to remove the email envelope from git or formail as
-			# msmtp (sendmail) would choke on them.
-			#
-			# Modify the patch date for sequential delivery, but retain the
-			# original date as "Old-Date".
-			DATE=$(date +"%a, %d %b %Y %k:%M:%S %z")
-			GIT_FROM=$(cat $PATCH | formail -X "From:")
-			cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -I "From: $FROM" -i "Date: $DATE" | sed "0,/^$/s/^$/\n$GIT_FROM\n/" | tail -n +2 | sendmail -t
-			if [ $? -eq 1 ]; then
-				ERROR=1
-			fi
-		done
-		;;
-	*)
-		echo "ERROR: unknown MTA: $PULL_MTA"
-		usage
-		exit 1
-		;;
-	esac
+	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
+		# 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
+			ERROR=1
+		fi
+	done
 
 	if [ $ERROR -eq 1 ]; then
-		echo "ERROR: Failed to send one or more messages. Check your MTA log for details."
+		echo "ERROR: Failed to send one or more messages."
 	fi
 else
 	echo "Send aborted."
-- 
1.7.1




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

* [RFC PATCH 08/10] send-pull-request: fix greedy auto-cc regex
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (6 preceding siblings ...)
  2011-05-13 23:38 ` [RFC PATCH 07/10] send-pull-request: remove local mta support Darren Hart
@ 2011-05-13 23:38 ` Darren Hart
  2011-05-14  5:41   ` Bruce Ashfield
  2011-05-13 23:38 ` [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a Darren Hart
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:38 UTC (permalink / raw)
  To: openembedded-core

A greedy regular expression caused emails to be harvested from patches
that were quoted in the commit message. Ensure only tags that start at the
beginning of the line are considered for harvesting.

NOTE: users are still responsible for verifying the recipients list and to
      ensure they do not spam people!

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Saul Wold <sgw@linux.intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 scripts/send-pull-request |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index d265c47..b294d35 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -90,7 +90,7 @@ done
 if [ $AUTO -eq 1 ]; then
 	harvest_recipients TO "^[Tt][Oo]: *"
 	harvest_recipients CC "^[Cc][Cc]: *"
-	harvest_recipients CC "^.*-[Bb][Yy]: *"
+	harvest_recipients CC "^[A-Z][A-Za-z-]*-[Bb][Yy]: *"
 fi
 
 AUTO_TO="$(git config sendemail.to)"
-- 
1.7.1




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

* [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (7 preceding siblings ...)
  2011-05-13 23:38 ` [RFC PATCH 08/10] send-pull-request: fix greedy auto-cc regex Darren Hart
@ 2011-05-13 23:38 ` Darren Hart
  2011-05-13 23:44   ` Khem Raj
  2011-05-13 23:38 ` [RFC PATCH 10/10] send-pull-request: verify git sendemail config Darren Hart
  2011-05-14  3:47 ` [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
  10 siblings, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi

Rather than sending every patch to every recipient of the entire series when
-a is used, only send the cover letter to everyone and use git's
--signed-off-by-cc feature to generate an auto cc list for the individual
patches.

Using git to harvest the Cc list means only collecting Signed-off-by and Cc
lines, rather than the more generic *-by lines previously. This is a fair
trade-off for significantly reduced complexity. If users want to add Acked-by
and Tested-by lines and want to use the -a feature, they should include those
recipients as Cc lines as well.

Now that we rely on git for auto-cc for the individual patches,
make sure the user is prompted before sending each patch by forcing
--confirm=always.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Koen Kooi <koen@dominion.thruhere.net>
---
 scripts/send-pull-request |   60 +++++++++++++++++++++++++++------------------
 1 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index b294d35..f94596f 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -4,33 +4,34 @@ AUTO=0
 # Prevent environment leakage to these vars.
 unset TO
 unset CC
+unset AUTO_CC
 
 usage()
 {
 cat <<EOM
 Usage: $(basename $0) [-h] [-a] [[-t email]...] -p pull-dir 
   -t email     Explicitly add email to the recipients
-  -a           Automatically harvest recipients from "*-by: email" lines
-               in the patches in the pull-dir
+  -a           Automatically harvest recipients from Cc and Signed-off-by lines
+               in the patches in the pull-dir. These will be used on a per
+               patch basis. The cover-letter will be sent to all addresses.
   -p pull-dir  Directory containing summary and patch files
 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
+# Collect addresses from a patch into AUTO_CC
+# $1: a patch file
 harvest_recipients()
 {
-	TO_CC=$1
-	REGX=$2
+	PATCH=$1
 	export IFS=$',\n'
-	for PATCH in $PDIR/*.patch; do
-		# Grab To addresses
+	for REGX in "^[Cc][Cc]: *" "^[Ss]igned-[Oo]ff-[Bb]y: *"; do
 		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
+			if [ "${AUTO_CC/$EMAIL/}" == "$AUTO_CC" ] && [ -n "$EMAIL" ]; then
+				if [ -z "$AUTO_CC" ]; then
+					AUTO_CC=$EMAIL;
+				else
+					AUTO_CC="$AUTO_CC,$EMAIL";
+				fi
 			fi
 		done
 	done
@@ -84,13 +85,11 @@ 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.
+# Harvest emails from the generated patches and populate AUTO_CC.
 if [ $AUTO -eq 1 ]; then
-	harvest_recipients TO "^[Tt][Oo]: *"
-	harvest_recipients CC "^[Cc][Cc]: *"
-	harvest_recipients CC "^[A-Z][A-Za-z-]*-[Bb][Yy]: *"
+	for PATCH in $PDIR/*.patch; do
+		harvest_recipients $PATCH
+	done
 fi
 
 AUTO_TO="$(git config sendemail.to)"
@@ -102,7 +101,7 @@ if [ -n "$AUTO_TO" ]; then
 	fi
 fi
 
-if [ -z "$TO" ] && [ -z "$CC" ]; then
+if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then
 	echo "ERROR: you have not specified any recipients."
 	usage
 	exit 1
@@ -114,7 +113,8 @@ cat <<EOM
 The following patches:
 $(for PATCH in $PDIR/*.patch; do echo "    $PATCH"; done)
 
-will now be sent via the git send-email command.
+will now be sent via the git send-email command. Git will prompt you before
+sending any email.
 
 EOM
 echo "Continue? [y/N] "
@@ -124,11 +124,23 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
 	ERROR=0
 	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)
+	GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done)
 	unset IFS
 	for PATCH in $PDIR/*patch; do
-		# 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 [ $AUTO -eq 1 ]; then
+			if [ $PATCH == "$CL" ]; then
+				# Send the cover letter to every recipient, both
+				# specified as well as harvested.
+				eval "git send-email $GIT_TO $GIT_CC --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
+			else
+				# Send the patch to the specified recipients and
+				# those git finds in this specific patch.
+				eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --signed-off-by-cc $PATCH"
+			fi
+		else
+			# Only send to the explicitly specified recipients
+			eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
+		fi
 		if [ $? -eq 1 ]; then
 			ERROR=1
 		fi
-- 
1.7.1




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

* [RFC PATCH 10/10] send-pull-request: verify git sendemail config
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (8 preceding siblings ...)
  2011-05-13 23:38 ` [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a Darren Hart
@ 2011-05-13 23:38 ` Darren Hart
  2011-05-14  5:43   ` Bruce Ashfield
  2011-05-14  3:47 ` [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
  10 siblings, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-13 23:38 UTC (permalink / raw)
  To: openembedded-core

Perform a quick sanity check to be able to direct users to configure
git.sendemail if they haven't yet.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 scripts/send-pull-request |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index f94596f..2ccb8e8 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -38,6 +38,18 @@ harvest_recipients()
 	unset IFS
 }
 
+check_git_sendemail_config()
+{
+	GIT_SMTP=$(git config sendemail.smtpserver)
+	GIT_FROM=$(git config sendemail.from)
+	if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
+		echo "ERROR: git sendemail is not configured."
+		echo "Please read GIT-SEND-EMAIL(1) and configure:"
+		echo "  sendemail.smtpserver"
+		echo "  sendemail.from"
+		exit 1
+	fi
+}
 
 # Parse and verify arguments
 while getopts "ahp:t:" OPT; do
@@ -67,6 +79,9 @@ while getopts "ahp:t:" OPT; do
 	esac
 done
 
+# Abort early if git-send-email is not properly configured
+check_git_sendemail_config
+
 if [ -z "$PDIR" ]; then
 	echo "ERROR: you must specify a pull-dir."
 	usage
-- 
1.7.1




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

* Re: [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a
  2011-05-13 23:38 ` [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a Darren Hart
@ 2011-05-13 23:44   ` Khem Raj
  2011-05-14  0:14     ` Joshua Lock
  2011-05-14  0:31     ` Darren Hart
  0 siblings, 2 replies; 25+ messages in thread
From: Khem Raj @ 2011-05-13 23:44 UTC (permalink / raw)
  To: Darren Hart; +Cc: Koen Kooi, openembedded-core

On Fri, May 13, 2011 at 4:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> Rather than sending every patch to every recipient of the entire series when
> -a is used, only send the cover letter to everyone and use git's
> --signed-off-by-cc feature to generate an auto cc list for the individual
> patches.
>
> Using git to harvest the Cc list means only collecting Signed-off-by and Cc
> lines, rather than the more generic *-by lines previously. This is a fair
> trade-off for significantly reduced complexity. If users want to add Acked-by
> and Tested-by lines and want to use the -a feature, they should include those
> recipients as Cc lines as well.
>
> Now that we rely on git for auto-cc for the individual patches,
> make sure the user is prompted before sending each patch by forcing
> --confirm=always.

it can be tedious for large patchsets say 30-40 patches. and moreover
if something is wrong in middle of sending series of patches say a CC
list is wrong then what to do as some of the patches would have
already been sent.  So I would suggest a dry pass
where it will show you the email headers and CC list so sender can be
assured that all is well
and then he can send them all at once.

>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> Cc: Khem Raj <raj.khem@gmail.com>
> Cc: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  scripts/send-pull-request |   60 +++++++++++++++++++++++++++------------------
>  1 files changed, 36 insertions(+), 24 deletions(-)
>
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index b294d35..f94596f 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -4,33 +4,34 @@ AUTO=0
>  # Prevent environment leakage to these vars.
>  unset TO
>  unset CC
> +unset AUTO_CC
>
>  usage()
>  {
>  cat <<EOM
>  Usage: $(basename $0) [-h] [-a] [[-t email]...] -p pull-dir
>   -t email     Explicitly add email to the recipients
> -  -a           Automatically harvest recipients from "*-by: email" lines
> -               in the patches in the pull-dir
> +  -a           Automatically harvest recipients from Cc and Signed-off-by lines
> +               in the patches in the pull-dir. These will be used on a per
> +               patch basis. The cover-letter will be sent to all addresses.
>   -p pull-dir  Directory containing summary and patch files
>  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
> +# Collect addresses from a patch into AUTO_CC
> +# $1: a patch file
>  harvest_recipients()
>  {
> -       TO_CC=$1
> -       REGX=$2
> +       PATCH=$1
>        export IFS=$',\n'
> -       for PATCH in $PDIR/*.patch; do
> -               # Grab To addresses
> +       for REGX in "^[Cc][Cc]: *" "^[Ss]igned-[Oo]ff-[Bb]y: *"; do
>                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
> +                       if [ "${AUTO_CC/$EMAIL/}" == "$AUTO_CC" ] && [ -n "$EMAIL" ]; then
> +                               if [ -z "$AUTO_CC" ]; then
> +                                       AUTO_CC=$EMAIL;
> +                               else
> +                                       AUTO_CC="$AUTO_CC,$EMAIL";
> +                               fi
>                        fi
>                done
>        done
> @@ -84,13 +85,11 @@ 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.
> +# Harvest emails from the generated patches and populate AUTO_CC.
>  if [ $AUTO -eq 1 ]; then
> -       harvest_recipients TO "^[Tt][Oo]: *"
> -       harvest_recipients CC "^[Cc][Cc]: *"
> -       harvest_recipients CC "^[A-Z][A-Za-z-]*-[Bb][Yy]: *"
> +       for PATCH in $PDIR/*.patch; do
> +               harvest_recipients $PATCH
> +       done
>  fi
>
>  AUTO_TO="$(git config sendemail.to)"
> @@ -102,7 +101,7 @@ if [ -n "$AUTO_TO" ]; then
>        fi
>  fi
>
> -if [ -z "$TO" ] && [ -z "$CC" ]; then
> +if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then
>        echo "ERROR: you have not specified any recipients."
>        usage
>        exit 1
> @@ -114,7 +113,8 @@ cat <<EOM
>  The following patches:
>  $(for PATCH in $PDIR/*.patch; do echo "    $PATCH"; done)
>
> -will now be sent via the git send-email command.
> +will now be sent via the git send-email command. Git will prompt you before
> +sending any email.
>
>  EOM
>  echo "Continue? [y/N] "
> @@ -124,11 +124,23 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
>        ERROR=0
>        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)
> +       GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done)
>        unset IFS
>        for PATCH in $PDIR/*patch; do
> -               # 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 [ $AUTO -eq 1 ]; then
> +                       if [ $PATCH == "$CL" ]; then
> +                               # Send the cover letter to every recipient, both
> +                               # specified as well as harvested.
> +                               eval "git send-email $GIT_TO $GIT_CC --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
> +                       else
> +                               # Send the patch to the specified recipients and
> +                               # those git finds in this specific patch.
> +                               eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --signed-off-by-cc $PATCH"
> +                       fi
> +               else
> +                       # Only send to the explicitly specified recipients
> +                       eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
> +               fi
>                if [ $? -eq 1 ]; then
>                        ERROR=1
>                fi
> --
> 1.7.1
>
>



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

* Re: [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a
  2011-05-13 23:44   ` Khem Raj
@ 2011-05-14  0:14     ` Joshua Lock
  2011-05-14  0:31     ` Darren Hart
  1 sibling, 0 replies; 25+ messages in thread
From: Joshua Lock @ 2011-05-14  0:14 UTC (permalink / raw)
  To: openembedded-core

On Fri, 2011-05-13 at 16:44 -0700, Khem Raj wrote:
> On Fri, May 13, 2011 at 4:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> > Rather than sending every patch to every recipient of the entire series when
> > -a is used, only send the cover letter to everyone and use git's
> > --signed-off-by-cc feature to generate an auto cc list for the individual
> > patches.
> >
> > Using git to harvest the Cc list means only collecting Signed-off-by and Cc
> > lines, rather than the more generic *-by lines previously. This is a fair
> > trade-off for significantly reduced complexity. If users want to add Acked-by
> > and Tested-by lines and want to use the -a feature, they should include those
> > recipients as Cc lines as well.
> >
> > Now that we rely on git for auto-cc for the individual patches,
> > make sure the user is prompted before sending each patch by forcing
> > --confirm=always.
> 
> it can be tedious for large patchsets say 30-40 patches. and moreover
> if something is wrong in middle of sending series of patches say a CC
> list is wrong then what to do as some of the patches would have
> already been sent.  So I would suggest a dry pass
> where it will show you the email headers and CC list so sender can be
> assured that all is well
> and then he can send them all at once.

Agree with Khem here, unless you're trying to force people to send
smaller patch series?

> 
> >
> > Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> > Cc: Khem Raj <raj.khem@gmail.com>
> > Cc: Koen Kooi <koen@dominion.thruhere.net>
> > ---
> >  scripts/send-pull-request |   60 +++++++++++++++++++++++++++------------------
> >  1 files changed, 36 insertions(+), 24 deletions(-)
> >
> > diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> > index b294d35..f94596f 100755
> > --- a/scripts/send-pull-request
> > +++ b/scripts/send-pull-request
> > @@ -4,33 +4,34 @@ AUTO=0
> >  # Prevent environment leakage to these vars.
> >  unset TO
> >  unset CC
> > +unset AUTO_CC
> >
> >  usage()
> >  {
> >  cat <<EOM
> >  Usage: $(basename $0) [-h] [-a] [[-t email]...] -p pull-dir
> >   -t email     Explicitly add email to the recipients
> > -  -a           Automatically harvest recipients from "*-by: email" lines
> > -               in the patches in the pull-dir
> > +  -a           Automatically harvest recipients from Cc and Signed-off-by lines
> > +               in the patches in the pull-dir. These will be used on a per
> > +               patch basis. The cover-letter will be sent to all addresses.
> >   -p pull-dir  Directory containing summary and patch files
> >  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
> > +# Collect addresses from a patch into AUTO_CC
> > +# $1: a patch file
> >  harvest_recipients()
> >  {
> > -       TO_CC=$1
> > -       REGX=$2
> > +       PATCH=$1
> >        export IFS=$',\n'
> > -       for PATCH in $PDIR/*.patch; do
> > -               # Grab To addresses
> > +       for REGX in "^[Cc][Cc]: *" "^[Ss]igned-[Oo]ff-[Bb]y: *"; do
> >                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
> > +                       if [ "${AUTO_CC/$EMAIL/}" == "$AUTO_CC" ] && [ -n "$EMAIL" ]; then
> > +                               if [ -z "$AUTO_CC" ]; then
> > +                                       AUTO_CC=$EMAIL;
> > +                               else
> > +                                       AUTO_CC="$AUTO_CC,$EMAIL";
> > +                               fi
> >                        fi
> >                done
> >        done
> > @@ -84,13 +85,11 @@ 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.
> > +# Harvest emails from the generated patches and populate AUTO_CC.
> >  if [ $AUTO -eq 1 ]; then
> > -       harvest_recipients TO "^[Tt][Oo]: *"
> > -       harvest_recipients CC "^[Cc][Cc]: *"
> > -       harvest_recipients CC "^[A-Z][A-Za-z-]*-[Bb][Yy]: *"
> > +       for PATCH in $PDIR/*.patch; do
> > +               harvest_recipients $PATCH
> > +       done
> >  fi
> >
> >  AUTO_TO="$(git config sendemail.to)"
> > @@ -102,7 +101,7 @@ if [ -n "$AUTO_TO" ]; then
> >        fi
> >  fi
> >
> > -if [ -z "$TO" ] && [ -z "$CC" ]; then
> > +if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then
> >        echo "ERROR: you have not specified any recipients."
> >        usage
> >        exit 1
> > @@ -114,7 +113,8 @@ cat <<EOM
> >  The following patches:
> >  $(for PATCH in $PDIR/*.patch; do echo "    $PATCH"; done)
> >
> > -will now be sent via the git send-email command.
> > +will now be sent via the git send-email command. Git will prompt you before
> > +sending any email.
> >
> >  EOM
> >  echo "Continue? [y/N] "
> > @@ -124,11 +124,23 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
> >        ERROR=0
> >        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)
> > +       GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done)
> >        unset IFS
> >        for PATCH in $PDIR/*patch; do
> > -               # 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 [ $AUTO -eq 1 ]; then
> > +                       if [ $PATCH == "$CL" ]; then
> > +                               # Send the cover letter to every recipient, both
> > +                               # specified as well as harvested.
> > +                               eval "git send-email $GIT_TO $GIT_CC --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
> > +                       else
> > +                               # Send the patch to the specified recipients and
> > +                               # those git finds in this specific patch.
> > +                               eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --signed-off-by-cc $PATCH"
> > +                       fi
> > +               else
> > +                       # Only send to the explicitly specified recipients
> > +                       eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
> > +               fi
> >                if [ $? -eq 1 ]; then
> >                        ERROR=1
> >                fi
> > --
> > 1.7.1
> >
> >
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Centre




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

* Re: [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes
  2011-05-13 23:37 ` [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes Darren Hart
@ 2011-05-14  0:14   ` Joshua Lock
  2011-05-14  2:04     ` Darren Hart
  2011-05-14  3:19     ` Darren Hart
  0 siblings, 2 replies; 25+ messages in thread
From: Joshua Lock @ 2011-05-14  0:14 UTC (permalink / raw)
  To: openembedded-core

On Fri, 2011-05-13 at 16:37 -0700, Darren Hart wrote:
> Allow for arbitrary remotes via a new -u argument. Remove the hard coded
> references to the pokylinux repositories. Create the WEB_URL from known
> remotes. Future patches can add additional WEB_URL mappings for remotes
> like Git Hub, Gitorious, and kernel.org.
> 
> Rather than duplicating the git request-pull command ourselves, just use
> the existing one.
> 
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> Cc: Tom Rini <tom_rini@mentor.com>
> Cc: Martin Jansa <martin.jansa@gmail.com>
> Cc: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  scripts/create-pull-request |   74 ++++++++++++++++++++++++++++--------------
>  1 files changed, 49 insertions(+), 25 deletions(-)
> 
> diff --git a/scripts/create-pull-request b/scripts/create-pull-request
> index b7e015a..c6cf817 100755
> --- a/scripts/create-pull-request
> +++ b/scripts/create-pull-request
> @@ -2,14 +2,13 @@
>  ODIR=pull-$$
>  RELATIVE_TO="master"
>  COMMIT_ID="HEAD"
> -PULL_URL="git://git.pokylinux.org/poky-contrib.git"
>  PREFIX="PATCH"
>  
>  usage() {
>  CMD=$(basename $0)
>  cat <<EOM
> -Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -b contrib_branch
> -  -b contrib_branch   Branch-name in the git.pokylinux.org/poky-contrib tree
> +Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote -b branch
> +  -b branch           Branch name in the specified remote
>    -h                  Display this help message
>    -i commit_id        Ending commit (default: HEAD)
>    -m msg_body_file    The file containing a blurb to be inserted into the summary email
> @@ -17,20 +16,21 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
>    -p prefix           Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
>    -r relative_to      Starting commit (default: master)
>    -s subject          The subject to be inserted into the summary email
> +  -u remote           The git remote where the branch is located
>  
>   Examples:
> -   $CMD -b nitin/basic
> -   $CMD -r distro/master -i nitin/distro -b nitin/distro
> -   $CMD -r master -i misc -b nitin/misc -o pull-misc
> -   $CMD -p "RFC PATCH" -b nitin/experimental
> +   $CMD -u contrib -b nitin/basic
> +   $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro
> +   $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
> +   $CMD -u contrib -p "RFC PATCH" -b nitin/experimental
>  EOM
>  }
>  
>  # Parse and validate arguments
> -while getopts "b:hi:m:o:p:r:s:" OPT; do
> +while getopts "b:hi:m:o:p:r:s:u:" OPT; do
>  	case $OPT in
>  	b)
> -		CONTRIB_BRANCH="$OPTARG"
> +		BRANCH="$OPTARG"
>  		;;
>  	h)
>  		usage
> @@ -58,23 +58,42 @@ while getopts "b:hi:m:o:p:r:s:" OPT; do
>  	s)
>  		SUBJECT="$OPTARG"
>  		;;
> +	u)
> +		REMOTE="$OPTARG"
> +		REMOTE_URL=$(git config remote.$REMOTE.url)
> +		if [ $? -ne 0 ]; then
> +			echo "ERROR: git config failed to find a url for '$REMOTE'"
> +			exit 1
> +		fi
> +		;;
>  	esac
>  done
>  
> -if [ -z "$CONTRIB_BRANCH" ]; then
> +if [ -z "$BRANCH" ] || [ -z "$REMOTE_URL" ]; then
>  	usage
>  	exit 1
>  fi
>  
> 
> +# Set WEB_URL from known remotes
> +case "$REMOTE_URL" in
> +	*git.yoctoproject.org*)
> +		WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
> +		;;
> +	*git.pokylinux.org*)
> +		WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
> +		;;
> +esac

Nit: what about if this is a remote branch on that server but not for
that repo?

> +
>  # Perform a sanity test on the web URL. Issue a warning if it is not
>  # accessible, but do not abort as users may want to run offline.
> -WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$CONTRIB_BRANCH"
> -wget -q $WEB_URL -O /dev/null
> -if [ $? -ne 0 ]; then
> -	echo "WARNING: Branch '$CONTRIB_BRANCH' was not found on the contrib git tree."
> -	echo "         Please check your contrib-branch parameter before sending."
> -	echo ""
> +if [ -n "$WEB_URL" ]; then
> +	wget -q $WEB_URL -O /dev/null
> +	if [ $? -ne 0 ]; then
> +		echo "WARNING: Branch '$BRANCH' was not found on the contrib git tree."
> +		echo "         Please check your remote and branch parameter before sending."
> +		echo ""
> +	fi
>  fi
>  
>  if [ -e $ODIR ]; then
> @@ -90,18 +109,23 @@ git format-patch -M --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --co
>  
>  # Customize the cover letter
>  CL="$ODIR/0000-cover-letter.patch"
> -(cat <<EOM
> +PM="$ODIR/pull-msg"
> +git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID > "$PM"
> +if [ $? -ne 0 ]; then
> +	echo "ERROR: git request-pull reported an error"
> +	exit 1
> +fi
>  
> -Pull URL: $PULL_URL
> -  Branch: $CONTRIB_BRANCH
> -  Browse: $WEB_URL
> +# The cover letter already has a diffstat, remove it from the pull-msg
> +# before inserting it.
> +sed -n "0,\#$REMOTE_URL# p" "$PM" | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
> +rm "$PM"
>  
> -Thanks,
> -    $(git config user.name) <$(git config user.email)>
> ----
> +# Insert the WEB_URL if there is one
> +if [ -n "$WEB_URL" ]; then
> +	echo "  $WEB_URL" | sed -i "\#$REMOTE_URL# r /dev/stdin" "$CL"
> +fi
>  
> -EOM
> -) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
>  
>  # If the user specified a message body, insert it into the cover letter and
>  # remove the BLURB token.

-- 
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Centre




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

* Re: [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a
  2011-05-13 23:44   ` Khem Raj
  2011-05-14  0:14     ` Joshua Lock
@ 2011-05-14  0:31     ` Darren Hart
  1 sibling, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-14  0:31 UTC (permalink / raw)
  To: Khem Raj; +Cc: Koen Kooi, openembedded-core



On 05/13/2011 04:44 PM, Khem Raj wrote:
> On Fri, May 13, 2011 at 4:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>> Rather than sending every patch to every recipient of the entire series when
>> -a is used, only send the cover letter to everyone and use git's
>> --signed-off-by-cc feature to generate an auto cc list for the individual
>> patches.
>>
>> Using git to harvest the Cc list means only collecting Signed-off-by and Cc
>> lines, rather than the more generic *-by lines previously. This is a fair
>> trade-off for significantly reduced complexity. If users want to add Acked-by
>> and Tested-by lines and want to use the -a feature, they should include those
>> recipients as Cc lines as well.
>>
>> Now that we rely on git for auto-cc for the individual patches,
>> make sure the user is prompted before sending each patch by forcing
>> --confirm=always.
> 
> it can be tedious for large patchsets say 30-40 patches. and moreover


or 10.... <cough>


> if something is wrong in middle of sending series of patches say a CC
> list is wrong then what to do as some of the patches would have
> already been sent.


We already break the process up by creating the patches in a directory
for people review. Do we really need a third stage?


> So I would suggest a dry pass
> where it will show you the email headers and CC list so sender can be
> assured that all is well
> and then he can send them all at once.


I was pondering this one, wondering who would catch it first ;-)

We currently loop through all the patches and send them individually,
this is an artifact of the old code. We could send the cover letter with
one git command, and all the rest with one more. This would much more
closer match a typical git-send-email session, and would allow for using
the "all" option from git-send-email.

As for a dry run followed by a send... that would be selecting no for
all the send requests and validating them, then:

$ yes | ./send-pull-request ...

We could add a --dry-run (or -d I guess) option to make the first pass
easier.

THoughts?

--
Darren

> 
>>
>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>> Cc: Khem Raj <raj.khem@gmail.com>
>> Cc: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>>  scripts/send-pull-request |   60 +++++++++++++++++++++++++++------------------
>>  1 files changed, 36 insertions(+), 24 deletions(-)
>>
>> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
>> index b294d35..f94596f 100755
>> --- a/scripts/send-pull-request
>> +++ b/scripts/send-pull-request
>> @@ -4,33 +4,34 @@ AUTO=0
>>  # Prevent environment leakage to these vars.
>>  unset TO
>>  unset CC
>> +unset AUTO_CC
>>
>>  usage()
>>  {
>>  cat <<EOM
>>  Usage: $(basename $0) [-h] [-a] [[-t email]...] -p pull-dir
>>   -t email     Explicitly add email to the recipients
>> -  -a           Automatically harvest recipients from "*-by: email" lines
>> -               in the patches in the pull-dir
>> +  -a           Automatically harvest recipients from Cc and Signed-off-by lines
>> +               in the patches in the pull-dir. These will be used on a per
>> +               patch basis. The cover-letter will be sent to all addresses.
>>   -p pull-dir  Directory containing summary and patch files
>>  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
>> +# Collect addresses from a patch into AUTO_CC
>> +# $1: a patch file
>>  harvest_recipients()
>>  {
>> -       TO_CC=$1
>> -       REGX=$2
>> +       PATCH=$1
>>        export IFS=$',\n'
>> -       for PATCH in $PDIR/*.patch; do
>> -               # Grab To addresses
>> +       for REGX in "^[Cc][Cc]: *" "^[Ss]igned-[Oo]ff-[Bb]y: *"; do
>>                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
>> +                       if [ "${AUTO_CC/$EMAIL/}" == "$AUTO_CC" ] && [ -n "$EMAIL" ]; then
>> +                               if [ -z "$AUTO_CC" ]; then
>> +                                       AUTO_CC=$EMAIL;
>> +                               else
>> +                                       AUTO_CC="$AUTO_CC,$EMAIL";
>> +                               fi
>>                        fi
>>                done
>>        done
>> @@ -84,13 +85,11 @@ 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.
>> +# Harvest emails from the generated patches and populate AUTO_CC.
>>  if [ $AUTO -eq 1 ]; then
>> -       harvest_recipients TO "^[Tt][Oo]: *"
>> -       harvest_recipients CC "^[Cc][Cc]: *"
>> -       harvest_recipients CC "^[A-Z][A-Za-z-]*-[Bb][Yy]: *"
>> +       for PATCH in $PDIR/*.patch; do
>> +               harvest_recipients $PATCH
>> +       done
>>  fi
>>
>>  AUTO_TO="$(git config sendemail.to)"
>> @@ -102,7 +101,7 @@ if [ -n "$AUTO_TO" ]; then
>>        fi
>>  fi
>>
>> -if [ -z "$TO" ] && [ -z "$CC" ]; then
>> +if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then
>>        echo "ERROR: you have not specified any recipients."
>>        usage
>>        exit 1
>> @@ -114,7 +113,8 @@ cat <<EOM
>>  The following patches:
>>  $(for PATCH in $PDIR/*.patch; do echo "    $PATCH"; done)
>>
>> -will now be sent via the git send-email command.
>> +will now be sent via the git send-email command. Git will prompt you before
>> +sending any email.
>>
>>  EOM
>>  echo "Continue? [y/N] "
>> @@ -124,11 +124,23 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
>>        ERROR=0
>>        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)
>> +       GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done)
>>        unset IFS
>>        for PATCH in $PDIR/*patch; do
>> -               # 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 [ $AUTO -eq 1 ]; then
>> +                       if [ $PATCH == "$CL" ]; then
>> +                               # Send the cover letter to every recipient, both
>> +                               # specified as well as harvested.
>> +                               eval "git send-email $GIT_TO $GIT_CC --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
>> +                       else
>> +                               # Send the patch to the specified recipients and
>> +                               # those git finds in this specific patch.
>> +                               eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --signed-off-by-cc $PATCH"
>> +                       fi
>> +               else
>> +                       # Only send to the explicitly specified recipients
>> +                       eval "git send-email $GIT_TO --confirm=always --no-chain-reply-to --suppress-cc=all $PATCH"
>> +               fi
>>                if [ $? -eq 1 ]; then
>>                        ERROR=1
>>                fi
>> --
>> 1.7.1
>>
>>

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes
  2011-05-14  0:14   ` Joshua Lock
@ 2011-05-14  2:04     ` Darren Hart
  2011-05-14  3:19     ` Darren Hart
  1 sibling, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-14  2:04 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer



On 05/13/2011 05:14 PM, Joshua Lock wrote:
> On Fri, 2011-05-13 at 16:37 -0700, Darren Hart wrote:
>> Allow for arbitrary remotes via a new -u argument. Remove the hard coded
>> references to the pokylinux repositories. Create the WEB_URL from known
>> remotes. Future patches can add additional WEB_URL mappings for remotes
>> like Git Hub, Gitorious, and kernel.org.
>>
>> Rather than duplicating the git request-pull command ourselves, just use
>> the existing one.
>>
>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>> Cc: Tom Rini <tom_rini@mentor.com>
>> Cc: Martin Jansa <martin.jansa@gmail.com>
>> Cc: Otavio Salvador <otavio@ossystems.com.br>
>> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>>  scripts/create-pull-request |   74 ++++++++++++++++++++++++++++--------------
>>  1 files changed, 49 insertions(+), 25 deletions(-)
>>
>> diff --git a/scripts/create-pull-request b/scripts/create-pull-request
>> index b7e015a..c6cf817 100755
>> --- a/scripts/create-pull-request
>> +++ b/scripts/create-pull-request
>> @@ -2,14 +2,13 @@
>>  ODIR=pull-$$
>>  RELATIVE_TO="master"
>>  COMMIT_ID="HEAD"
>> -PULL_URL="git://git.pokylinux.org/poky-contrib.git"
>>  PREFIX="PATCH"
>>  
>>  usage() {
>>  CMD=$(basename $0)
>>  cat <<EOM
>> -Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -b contrib_branch
>> -  -b contrib_branch   Branch-name in the git.pokylinux.org/poky-contrib tree
>> +Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote -b branch
>> +  -b branch           Branch name in the specified remote
>>    -h                  Display this help message
>>    -i commit_id        Ending commit (default: HEAD)
>>    -m msg_body_file    The file containing a blurb to be inserted into the summary email
>> @@ -17,20 +16,21 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
>>    -p prefix           Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
>>    -r relative_to      Starting commit (default: master)
>>    -s subject          The subject to be inserted into the summary email
>> +  -u remote           The git remote where the branch is located
>>  
>>   Examples:
>> -   $CMD -b nitin/basic
>> -   $CMD -r distro/master -i nitin/distro -b nitin/distro
>> -   $CMD -r master -i misc -b nitin/misc -o pull-misc
>> -   $CMD -p "RFC PATCH" -b nitin/experimental
>> +   $CMD -u contrib -b nitin/basic
>> +   $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro
>> +   $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
>> +   $CMD -u contrib -p "RFC PATCH" -b nitin/experimental
>>  EOM
>>  }
>>  
>>  # Parse and validate arguments
>> -while getopts "b:hi:m:o:p:r:s:" OPT; do
>> +while getopts "b:hi:m:o:p:r:s:u:" OPT; do
>>  	case $OPT in
>>  	b)
>> -		CONTRIB_BRANCH="$OPTARG"
>> +		BRANCH="$OPTARG"
>>  		;;
>>  	h)
>>  		usage
>> @@ -58,23 +58,42 @@ while getopts "b:hi:m:o:p:r:s:" OPT; do
>>  	s)
>>  		SUBJECT="$OPTARG"
>>  		;;
>> +	u)
>> +		REMOTE="$OPTARG"
>> +		REMOTE_URL=$(git config remote.$REMOTE.url)
>> +		if [ $? -ne 0 ]; then
>> +			echo "ERROR: git config failed to find a url for '$REMOTE'"
>> +			exit 1
>> +		fi
>> +		;;
>>  	esac
>>  done
>>  
>> -if [ -z "$CONTRIB_BRANCH" ]; then
>> +if [ -z "$BRANCH" ] || [ -z "$REMOTE_URL" ]; then
>>  	usage
>>  	exit 1
>>  fi
>>  
>>
>> +# Set WEB_URL from known remotes
>> +case "$REMOTE_URL" in
>> +	*git.yoctoproject.org*)
>> +		WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
>> +		;;
>> +	*git.pokylinux.org*)
>> +		WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
>> +		;;
>> +esac
> 
> Nit: what about if this is a remote branch on that server but not for
> that repo?

Doh, that isn't a nit, that's a bug. Thanks for catching it!

--
Darren

> 
>> +
>>  # Perform a sanity test on the web URL. Issue a warning if it is not
>>  # accessible, but do not abort as users may want to run offline.
>> -WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$CONTRIB_BRANCH"
>> -wget -q $WEB_URL -O /dev/null
>> -if [ $? -ne 0 ]; then
>> -	echo "WARNING: Branch '$CONTRIB_BRANCH' was not found on the contrib git tree."
>> -	echo "         Please check your contrib-branch parameter before sending."
>> -	echo ""
>> +if [ -n "$WEB_URL" ]; then
>> +	wget -q $WEB_URL -O /dev/null
>> +	if [ $? -ne 0 ]; then
>> +		echo "WARNING: Branch '$BRANCH' was not found on the contrib git tree."
>> +		echo "         Please check your remote and branch parameter before sending."
>> +		echo ""
>> +	fi
>>  fi
>>  
>>  if [ -e $ODIR ]; then
>> @@ -90,18 +109,23 @@ git format-patch -M --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --co
>>  
>>  # Customize the cover letter
>>  CL="$ODIR/0000-cover-letter.patch"
>> -(cat <<EOM
>> +PM="$ODIR/pull-msg"
>> +git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID > "$PM"
>> +if [ $? -ne 0 ]; then
>> +	echo "ERROR: git request-pull reported an error"
>> +	exit 1
>> +fi
>>  
>> -Pull URL: $PULL_URL
>> -  Branch: $CONTRIB_BRANCH
>> -  Browse: $WEB_URL
>> +# The cover letter already has a diffstat, remove it from the pull-msg
>> +# before inserting it.
>> +sed -n "0,\#$REMOTE_URL# p" "$PM" | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
>> +rm "$PM"
>>  
>> -Thanks,
>> -    $(git config user.name) <$(git config user.email)>
>> ----
>> +# Insert the WEB_URL if there is one
>> +if [ -n "$WEB_URL" ]; then
>> +	echo "  $WEB_URL" | sed -i "\#$REMOTE_URL# r /dev/stdin" "$CL"
>> +fi
>>  
>> -EOM
>> -) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
>>  
>>  # If the user specified a message body, insert it into the cover letter and
>>  # remove the BLURB token.
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes
  2011-05-14  0:14   ` Joshua Lock
  2011-05-14  2:04     ` Darren Hart
@ 2011-05-14  3:19     ` Darren Hart
  2011-05-16 16:31       ` Joshua Lock
  1 sibling, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-14  3:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


>> +# Set WEB_URL from known remotes
>> +case "$REMOTE_URL" in
>> +	*git.yoctoproject.org*)
>> +		WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
>> +		;;
>> +	*git.pokylinux.org*)
>> +		WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
>> +		;;
>> +esac
> 
> Nit: what about if this is a remote branch on that server but not for
> that repo?


I'll roll a fix into V2, how about this:

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 43a4b74..869e6e8 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -70,6 +70,7 @@ while getopts "b:chi:m:o:p:r:s:u:" OPT; do
                        echo "ERROR: git config failed to find a url for '$REMOTE'"
                        exit 1
                fi
+               REMOTE_REPO=$(echo $REMOTE_URL | sed "s#.*/\(.*\)\(.git\)#\1#")
 
                # Rewrite known private URLs to public URLs
                case "$REMOTE_URL" in
@@ -97,10 +98,10 @@ fi
 # Set WEB_URL from known remotes
 case "$REMOTE_URL" in
        *git.yoctoproject.org*)
-               WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
+               WEB_URL="http://git.yoctoproject.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
                ;;
        *git.pokylinux.org*)
-               WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
+               WEB_URL="http://git.pokylinux.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
                ;;
 esac

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [RFC PATCH 00/10] *-pull-request: cleanup and overhaul
  2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
                   ` (9 preceding siblings ...)
  2011-05-13 23:38 ` [RFC PATCH 10/10] send-pull-request: verify git sendemail config Darren Hart
@ 2011-05-14  3:47 ` Darren Hart
  10 siblings, 0 replies; 25+ messages in thread
From: Darren Hart @ 2011-05-14  3:47 UTC (permalink / raw)
  To: Darren Hart; +Cc: Martin Jansa, Koen Kooi, openembedded-core, Paul Eggleton

Note that oe-core has one additional commit to create-pull-request which
I didn't have in poky. I guess the scripts dirs aren't kept in sync the
same way meta is.

If you want to apply these as they are and not wait for v2, you just
need to revert the following commit from oe-core:

commit 84e07ef76bf4f484a2d5e0180632e7a4981a1af7
Author: Martin Jansa <Martin.Jansa@gmail.com>
Date:   Tue Mar 15 11:07:22 2011 +0100

    create-pull-request: switch URL from git.pokylinux.org/poky-contrib
to git.o

    Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

There is nothing wrong with the patch, I just didn't have it and this
series obsoletes it, so reverting it was easier than dealing with the
merge conflicts ;-)

--
Darren

On 05/13/2011 04:35 PM, Darren Hart wrote:
> After some discussion on the oe-core list regarding the *-pull-request scripts
> I provided a proposal, received some feedback, and these patches are the result
> of that discussion. The Cc list varies from patch to patch a bit more wildly
> than is typical as a final sanity test, although it does reflect who commented
> and expressed interest in which parts of the overhaul.
> 
> Please review the following changes for suitability for inclusion. If you have
> any objections or suggestions for improvement, please respond to the patches. If
> you agree with the changes, please provide your Acked-by.
> 
> The following changes since commit 65e5ebc1d27b0a6cb2e33596d6d32c536b857f0d:
> 
>   tcmode-default: fix a typo (2011-05-13 11:02:20 +0100)
> 
> are available in the git repository at:
>   git://git.pokylinux.org/poky-contrib.git dvhart/git-pull
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/git-pull
> 
> Darren Hart (10):
>   create-pull-request: alphabetize arguments
>   create-pull-request: whitespace cleanup
>   create-pull-request: use git request-pull and arbitrary remotes
>   create-pull-request: rewrite known private URLs to public URLs
>   create-pull-request: provide an RFC mode via -c argument
>   send-pull-request: whitespace cleanup
>   send-pull-request: remove local mta support
>   send-pull-request: fix greedy auto-cc regex
>   send-pull-request: don't send all patches to everyone even with -a
>   send-pull-request: verify git sendemail config
> 
>  scripts/create-pull-request |  176 +++++++++++++++++++----------
>  scripts/send-pull-request   |  265 ++++++++++++++++++-------------------------
>  2 files changed, 228 insertions(+), 213 deletions(-)
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [RFC PATCH 08/10] send-pull-request: fix greedy auto-cc regex
  2011-05-13 23:38 ` [RFC PATCH 08/10] send-pull-request: fix greedy auto-cc regex Darren Hart
@ 2011-05-14  5:41   ` Bruce Ashfield
  0 siblings, 0 replies; 25+ messages in thread
From: Bruce Ashfield @ 2011-05-14  5:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, May 13, 2011 at 7:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> A greedy regular expression caused emails to be harvested from patches
> that were quoted in the commit message. Ensure only tags that start at the
> beginning of the line are considered for harvesting.
>
> NOTE: users are still responsible for verifying the recipients list and to
>      ensure they do not spam people!

This is key!

But a change for the better.

Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>

Bruce

>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
> Cc: Saul Wold <sgw@linux.intel.com>
> Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>  scripts/send-pull-request |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index d265c47..b294d35 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -90,7 +90,7 @@ done
>  if [ $AUTO -eq 1 ]; then
>        harvest_recipients TO "^[Tt][Oo]: *"
>        harvest_recipients CC "^[Cc][Cc]: *"
> -       harvest_recipients CC "^.*-[Bb][Yy]: *"
> +       harvest_recipients CC "^[A-Z][A-Za-z-]*-[Bb][Yy]: *"
>  fi
>
>  AUTO_TO="$(git config sendemail.to)"
> --
> 1.7.1
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



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

* Re: [RFC PATCH 10/10] send-pull-request: verify git sendemail config
  2011-05-13 23:38 ` [RFC PATCH 10/10] send-pull-request: verify git sendemail config Darren Hart
@ 2011-05-14  5:43   ` Bruce Ashfield
  2011-05-14 18:45     ` Darren Hart
  0 siblings, 1 reply; 25+ messages in thread
From: Bruce Ashfield @ 2011-05-14  5:43 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, May 13, 2011 at 7:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> Perform a quick sanity check to be able to direct users to configure
> git.sendemail if they haven't yet.
>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> ---
>  scripts/send-pull-request |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index f94596f..2ccb8e8 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -38,6 +38,18 @@ harvest_recipients()
>        unset IFS
>  }
>
> +check_git_sendemail_config()
> +{
> +       GIT_SMTP=$(git config sendemail.smtpserver)
> +       GIT_FROM=$(git config sendemail.from)
> +       if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
> +               echo "ERROR: git sendemail is not configured."
> +               echo "Please read GIT-SEND-EMAIL(1) and configure:"
> +               echo "  sendemail.smtpserver"
> +               echo "  sendemail.from"

I was going to ask for this to be optional, since I always pass the smtp
settings on the command line .. but then I realized that I invoke git send-email
directly anyway, so I don't need it to be optional. :)

Regardless, reading this from git config is good idea, so the above is
only a comment.

Bruce

> +               exit 1
> +       fi
> +}
>
>  # Parse and verify arguments
>  while getopts "ahp:t:" OPT; do
> @@ -67,6 +79,9 @@ while getopts "ahp:t:" OPT; do
>        esac
>  done
>
> +# Abort early if git-send-email is not properly configured
> +check_git_sendemail_config
> +
>  if [ -z "$PDIR" ]; then
>        echo "ERROR: you must specify a pull-dir."
>        usage
> --
> 1.7.1
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



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

* Re: [RFC PATCH 10/10] send-pull-request: verify git sendemail config
  2011-05-14  5:43   ` Bruce Ashfield
@ 2011-05-14 18:45     ` Darren Hart
  2011-05-15  2:48       ` Bruce Ashfield
  0 siblings, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-14 18:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer



On 05/13/2011 10:43 PM, Bruce Ashfield wrote:
> On Fri, May 13, 2011 at 7:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>> Perform a quick sanity check to be able to direct users to configure
>> git.sendemail if they haven't yet.
>>
>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>> ---
>>  scripts/send-pull-request |   15 +++++++++++++++
>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>
>> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
>> index f94596f..2ccb8e8 100755
>> --- a/scripts/send-pull-request
>> +++ b/scripts/send-pull-request
>> @@ -38,6 +38,18 @@ harvest_recipients()
>>        unset IFS
>>  }
>>
>> +check_git_sendemail_config()
>> +{
>> +       GIT_SMTP=$(git config sendemail.smtpserver)
>> +       GIT_FROM=$(git config sendemail.from)
>> +       if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
>> +               echo "ERROR: git sendemail is not configured."
>> +               echo "Please read GIT-SEND-EMAIL(1) and configure:"
>> +               echo "  sendemail.smtpserver"
>> +               echo "  sendemail.from"
> 
> I was going to ask for this to be optional, since I always pass the smtp
> settings on the command line .. but then I realized that I invoke git send-email
> directly anyway, so I don't need it to be optional. :)
> 
> Regardless, reading this from git config is good idea, so the above is
> only a comment.

This only impacts the send-pull-request script which requires
git-send-email to be configured in order to work, so it really can't be
an optional thing.

--
Darren

> 
> Bruce
> 
>> +               exit 1
>> +       fi
>> +}
>>
>>  # Parse and verify arguments
>>  while getopts "ahp:t:" OPT; do
>> @@ -67,6 +79,9 @@ while getopts "ahp:t:" OPT; do
>>        esac
>>  done
>>
>> +# Abort early if git-send-email is not properly configured
>> +check_git_sendemail_config
>> +
>>  if [ -z "$PDIR" ]; then
>>        echo "ERROR: you must specify a pull-dir."
>>        usage
>> --
>> 1.7.1
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
> 
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [RFC PATCH 10/10] send-pull-request: verify git sendemail config
  2011-05-14 18:45     ` Darren Hart
@ 2011-05-15  2:48       ` Bruce Ashfield
  2011-05-16 15:13         ` Darren Hart
  0 siblings, 1 reply; 25+ messages in thread
From: Bruce Ashfield @ 2011-05-15  2:48 UTC (permalink / raw)
  To: Darren Hart; +Cc: Patches and discussions about the oe-core layer

On Sat, May 14, 2011 at 2:45 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>
>
> On 05/13/2011 10:43 PM, Bruce Ashfield wrote:
>> On Fri, May 13, 2011 at 7:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>> Perform a quick sanity check to be able to direct users to configure
>>> git.sendemail if they haven't yet.
>>>
>>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>>> ---
>>>  scripts/send-pull-request |   15 +++++++++++++++
>>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
>>> index f94596f..2ccb8e8 100755
>>> --- a/scripts/send-pull-request
>>> +++ b/scripts/send-pull-request
>>> @@ -38,6 +38,18 @@ harvest_recipients()
>>>        unset IFS
>>>  }
>>>
>>> +check_git_sendemail_config()
>>> +{
>>> +       GIT_SMTP=$(git config sendemail.smtpserver)
>>> +       GIT_FROM=$(git config sendemail.from)
>>> +       if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
>>> +               echo "ERROR: git sendemail is not configured."
>>> +               echo "Please read GIT-SEND-EMAIL(1) and configure:"
>>> +               echo "  sendemail.smtpserver"
>>> +               echo "  sendemail.from"
>>
>> I was going to ask for this to be optional, since I always pass the smtp
>> settings on the command line .. but then I realized that I invoke git send-email
>> directly anyway, so I don't need it to be optional. :)
>>
>> Regardless, reading this from git config is good idea, so the above is
>> only a comment.
>
> This only impacts the send-pull-request script which requires
> git-send-email to be configured in order to work, so it really can't be
> an optional thing.

I meant making it optional from being in your .gitconfig. I use
git send-email with a smtp server almost every day .. and it's
not in my .gitconfig :)

Bruce

>
> --
> Darren
>
>>
>> Bruce
>>
>>> +               exit 1
>>> +       fi
>>> +}
>>>
>>>  # Parse and verify arguments
>>>  while getopts "ahp:t:" OPT; do
>>> @@ -67,6 +79,9 @@ while getopts "ahp:t:" OPT; do
>>>        esac
>>>  done
>>>
>>> +# Abort early if git-send-email is not properly configured
>>> +check_git_sendemail_config
>>> +
>>>  if [ -z "$PDIR" ]; then
>>>        echo "ERROR: you must specify a pull-dir."
>>>        usage
>>> --
>>> 1.7.1
>>>
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>>
>>
>>
>>
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



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

* Re: [RFC PATCH 10/10] send-pull-request: verify git sendemail config
  2011-05-15  2:48       ` Bruce Ashfield
@ 2011-05-16 15:13         ` Darren Hart
  2011-05-16 15:16           ` Bruce Ashfield
  0 siblings, 1 reply; 25+ messages in thread
From: Darren Hart @ 2011-05-16 15:13 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

On 05/14/2011 07:48 PM, Bruce Ashfield wrote:
> On Sat, May 14, 2011 at 2:45 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>
>>
>> On 05/13/2011 10:43 PM, Bruce Ashfield wrote:
>>> On Fri, May 13, 2011 at 7:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>>> Perform a quick sanity check to be able to direct users to configure
>>>> git.sendemail if they haven't yet.
>>>>
>>>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>>>> ---
>>>>  scripts/send-pull-request |   15 +++++++++++++++
>>>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
>>>> index f94596f..2ccb8e8 100755
>>>> --- a/scripts/send-pull-request
>>>> +++ b/scripts/send-pull-request
>>>> @@ -38,6 +38,18 @@ harvest_recipients()
>>>>        unset IFS
>>>>  }
>>>>
>>>> +check_git_sendemail_config()
>>>> +{
>>>> +       GIT_SMTP=$(git config sendemail.smtpserver)
>>>> +       GIT_FROM=$(git config sendemail.from)
>>>> +       if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
>>>> +               echo "ERROR: git sendemail is not configured."
>>>> +               echo "Please read GIT-SEND-EMAIL(1) and configure:"
>>>> +               echo "  sendemail.smtpserver"
>>>> +               echo "  sendemail.from"
>>>
>>> I was going to ask for this to be optional, since I always pass the smtp
>>> settings on the command line .. but then I realized that I invoke git send-email
>>> directly anyway, so I don't need it to be optional. :)
>>>
>>> Regardless, reading this from git config is good idea, so the above is
>>> only a comment.
>>
>> This only impacts the send-pull-request script which requires
>> git-send-email to be configured in order to work, so it really can't be
>> an optional thing.
> 
> I meant making it optional from being in your .gitconfig. I use
> git send-email with a smtp server almost every day .. and it's
> not in my .gitconfig :)

Right, duh. OK, so it order to make this optional, we would have to add
all the necessary options to pass through from the script to
git-send-email. I'd really rather avoid that.

What is your objection to having a default smtp/from in your git config?
You can always override it on the command line, and with confirm=always
in your git config (you're sane right?) there is little risk of sending
from the wrong account accidentally.

--
Darren

> 
> Bruce
> 
>>
>> --
>> Darren
>>
>>>
>>> Bruce
>>>
>>>> +               exit 1
>>>> +       fi
>>>> +}
>>>>
>>>>  # Parse and verify arguments
>>>>  while getopts "ahp:t:" OPT; do
>>>> @@ -67,6 +79,9 @@ while getopts "ahp:t:" OPT; do
>>>>        esac
>>>>  done
>>>>
>>>> +# Abort early if git-send-email is not properly configured
>>>> +check_git_sendemail_config
>>>> +
>>>>  if [ -z "$PDIR" ]; then
>>>>        echo "ERROR: you must specify a pull-dir."
>>>>        usage
>>>> --
>>>> 1.7.1
>>>>
>>>>
>>>> _______________________________________________
>>>> Openembedded-core mailing list
>>>> Openembedded-core@lists.openembedded.org
>>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>>>
>>>
>>>
>>>
>>
>> --
>> Darren Hart
>> Intel Open Source Technology Center
>> Yocto Project - Linux Kernel
>>
> 
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



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

* Re: [RFC PATCH 10/10] send-pull-request: verify git sendemail config
  2011-05-16 15:13         ` Darren Hart
@ 2011-05-16 15:16           ` Bruce Ashfield
  0 siblings, 0 replies; 25+ messages in thread
From: Bruce Ashfield @ 2011-05-16 15:16 UTC (permalink / raw)
  To: Darren Hart; +Cc: Patches and discussions about the oe-core layer

On Mon, May 16, 2011 at 11:13 AM, Darren Hart <dvhart@linux.intel.com> wrote:
> On 05/14/2011 07:48 PM, Bruce Ashfield wrote:
>> On Sat, May 14, 2011 at 2:45 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>>
>>>
>>> On 05/13/2011 10:43 PM, Bruce Ashfield wrote:
>>>> On Fri, May 13, 2011 at 7:38 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>>>> Perform a quick sanity check to be able to direct users to configure
>>>>> git.sendemail if they haven't yet.
>>>>>
>>>>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>>>>> ---
>>>>>  scripts/send-pull-request |   15 +++++++++++++++
>>>>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>>>>
>>>>> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
>>>>> index f94596f..2ccb8e8 100755
>>>>> --- a/scripts/send-pull-request
>>>>> +++ b/scripts/send-pull-request
>>>>> @@ -38,6 +38,18 @@ harvest_recipients()
>>>>>        unset IFS
>>>>>  }
>>>>>
>>>>> +check_git_sendemail_config()
>>>>> +{
>>>>> +       GIT_SMTP=$(git config sendemail.smtpserver)
>>>>> +       GIT_FROM=$(git config sendemail.from)
>>>>> +       if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
>>>>> +               echo "ERROR: git sendemail is not configured."
>>>>> +               echo "Please read GIT-SEND-EMAIL(1) and configure:"
>>>>> +               echo "  sendemail.smtpserver"
>>>>> +               echo "  sendemail.from"
>>>>
>>>> I was going to ask for this to be optional, since I always pass the smtp
>>>> settings on the command line .. but then I realized that I invoke git send-email
>>>> directly anyway, so I don't need it to be optional. :)
>>>>
>>>> Regardless, reading this from git config is good idea, so the above is
>>>> only a comment.
>>>
>>> This only impacts the send-pull-request script which requires
>>> git-send-email to be configured in order to work, so it really can't be
>>> an optional thing.
>>
>> I meant making it optional from being in your .gitconfig. I use
>> git send-email with a smtp server almost every day .. and it's
>> not in my .gitconfig :)
>
> Right, duh. OK, so it order to make this optional, we would have to add
> all the necessary options to pass through from the script to
> git-send-email. I'd really rather avoid that.

Exactly. that's why I dropped my idea of asking for it to be optional, you'd
need to chain it down, and that's a bad idea.

>
> What is your objection to having a default smtp/from in your git config?
> You can always override it on the command line, and with confirm=always
> in your git config (you're sane right?) there is little risk of sending
> from the wrong account accidentally.

I just have a zillion boxes, some with different connectivity, so that is
typically left out of my config. The hard error would cause me minimal
pain, but I invoke git send-email by hand, so it's no problem for me in
the long run.

So there's nothing here for you to change, if I needed something, I
could do it locally.

Cheers,

Bruce


>
> --
> Darren
>
>>
>> Bruce
>>
>>>
>>> --
>>> Darren
>>>
>>>>
>>>> Bruce
>>>>
>>>>> +               exit 1
>>>>> +       fi
>>>>> +}
>>>>>
>>>>>  # Parse and verify arguments
>>>>>  while getopts "ahp:t:" OPT; do
>>>>> @@ -67,6 +79,9 @@ while getopts "ahp:t:" OPT; do
>>>>>        esac
>>>>>  done
>>>>>
>>>>> +# Abort early if git-send-email is not properly configured
>>>>> +check_git_sendemail_config
>>>>> +
>>>>>  if [ -z "$PDIR" ]; then
>>>>>        echo "ERROR: you must specify a pull-dir."
>>>>>        usage
>>>>> --
>>>>> 1.7.1
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Openembedded-core mailing list
>>>>> Openembedded-core@lists.openembedded.org
>>>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Darren Hart
>>> Intel Open Source Technology Center
>>> Yocto Project - Linux Kernel
>>>
>>
>>
>>
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



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

* Re: [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes
  2011-05-14  3:19     ` Darren Hart
@ 2011-05-16 16:31       ` Joshua Lock
  0 siblings, 0 replies; 25+ messages in thread
From: Joshua Lock @ 2011-05-16 16:31 UTC (permalink / raw)
  To: Darren Hart; +Cc: Patches and discussions about the oe-core layer

On Fri, 2011-05-13 at 20:19 -0700, Darren Hart wrote:
> >> +# Set WEB_URL from known remotes
> >> +case "$REMOTE_URL" in
> >> +	*git.yoctoproject.org*)
> >> +		WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
> >> +		;;
> >> +	*git.pokylinux.org*)
> >> +		WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
> >> +		;;
> >> +esac
> > 
> > Nit: what about if this is a remote branch on that server but not for
> > that repo?
> 
> 
> I'll roll a fix into V2, how about this:
> 
> diff --git a/scripts/create-pull-request b/scripts/create-pull-request
> index 43a4b74..869e6e8 100755
> --- a/scripts/create-pull-request
> +++ b/scripts/create-pull-request
> @@ -70,6 +70,7 @@ while getopts "b:chi:m:o:p:r:s:u:" OPT; do
>                         echo "ERROR: git config failed to find a url for '$REMOTE'"
>                         exit 1
>                 fi
> +               REMOTE_REPO=$(echo $REMOTE_URL | sed "s#.*/\(.*\)\(.git\)#\1#")
>  
>                 # Rewrite known private URLs to public URLs
>                 case "$REMOTE_URL" in
> @@ -97,10 +98,10 @@ fi
>  # Set WEB_URL from known remotes
>  case "$REMOTE_URL" in
>         *git.yoctoproject.org*)
> -               WEB_URL="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
> +               WEB_URL="http://git.yoctoproject.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
>                 ;;
>         *git.pokylinux.org*)
> -               WEB_URL="http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=$BRANCH"
> +               WEB_URL="http://git.pokylinux.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
>                 ;;
>  esac
> 

Looks good to me.

Acked-by: Joshua Lock <josh@linux.intel.com>

Cheers,
Joshua
-- 
Joshua Lock
        Yocto Build System Monkey
        Intel Open Source Technology Centre




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

end of thread, other threads:[~2011-05-16 16:34 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13 23:35 [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart
2011-05-13 23:36 ` [RFC PATCH 01/10] create-pull-request: alphabetize arguments Darren Hart
2011-05-13 23:36 ` [RFC PATCH 02/10] create-pull-request: whitespace cleanup Darren Hart
2011-05-13 23:37 ` [RFC PATCH 03/10] create-pull-request: use git request-pull and arbitrary remotes Darren Hart
2011-05-14  0:14   ` Joshua Lock
2011-05-14  2:04     ` Darren Hart
2011-05-14  3:19     ` Darren Hart
2011-05-16 16:31       ` Joshua Lock
2011-05-13 23:37 ` [RFC PATCH 04/10] create-pull-request: rewrite known private URLs to public URLs Darren Hart
2011-05-13 23:37 ` [RFC PATCH 05/10] create-pull-request: provide an RFC mode via -c argument Darren Hart
2011-05-13 23:37 ` [RFC PATCH 06/10] send-pull-request: whitespace cleanup Darren Hart
2011-05-13 23:38 ` [RFC PATCH 07/10] send-pull-request: remove local mta support Darren Hart
2011-05-13 23:38 ` [RFC PATCH 08/10] send-pull-request: fix greedy auto-cc regex Darren Hart
2011-05-14  5:41   ` Bruce Ashfield
2011-05-13 23:38 ` [RFC PATCH 09/10] send-pull-request: don't send all patches to everyone even with -a Darren Hart
2011-05-13 23:44   ` Khem Raj
2011-05-14  0:14     ` Joshua Lock
2011-05-14  0:31     ` Darren Hart
2011-05-13 23:38 ` [RFC PATCH 10/10] send-pull-request: verify git sendemail config Darren Hart
2011-05-14  5:43   ` Bruce Ashfield
2011-05-14 18:45     ` Darren Hart
2011-05-15  2:48       ` Bruce Ashfield
2011-05-16 15:13         ` Darren Hart
2011-05-16 15:16           ` Bruce Ashfield
2011-05-14  3:47 ` [RFC PATCH 00/10] *-pull-request: cleanup and overhaul Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.