patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] 2-send-notice: add option for queued patch repo and remove context
@ 2019-04-30 17:31 Kevin Traynor
  2019-05-01 10:31 ` Kevin Traynor
  2019-05-01 10:52 ` [dpdk-stable] [PATCH v2] " Kevin Traynor
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Traynor @ 2019-04-30 17:31 UTC (permalink / raw)
  To: stable, bluca, yskoh; +Cc: Kevin Traynor

The diff at the end can be difficult to read. Add an option to have
a personal repo with the queued patches, and when available reduce the
email diff context to zero.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 README         |  7 +++++++
 compose-notice | 20 +++++++++++++++++++-
 lib.sh         |  3 +++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/README b/README
index bef3762..ec9c899 100644
--- a/README
+++ b/README
@@ -81,4 +81,11 @@ This will create .patch files located in stable-scripts/<release>/mail which can
 then be sent with git send-email to the authors and stable@dpdk.org.
 
+As part of this email a diff is provided between the master and stable branch
+patches. As there are diffs in the patches and diffs between the patches, it
+can be hard to see how the patch will look in the repo when there are rebase
+changes. To aid this, a personal repo like github can be used to store the queued
+patches and it can be referenced in the email. If it is available it is set it
+in lib.sh with QUEUED_REPO.
+
 3-request-backport
 ==================
diff --git a/compose-notice b/compose-notice
index ec6e6a9..d08119b 100644
--- a/compose-notice
+++ b/compose-notice
@@ -48,4 +48,15 @@ needed to apply to the stable branch. If there were code changes for rebasing
 correctly done.
 
+EOF
+
+if [ "$QUEUED_REPO" != "none" ]
+then
+	cat << EOF
+Queued patches can be viewed on a temporary branch at:
+	${QUEUED_REPO}
+
+EOF
+fi
+	cat << EOF
 Thanks.
 
@@ -69,5 +80,12 @@ construct_diff_of_diff()
 		echo "  Diff of the applied patch vs upstream commit (please double-check if non-empty:"
 		echo "---"
-		$GIT format-patch --stdout -1 $upstream_commit | diff -Naur - $patch
+		if [ "$QUEUED_REPO" != "none" ]
+		then
+			# There is a queued repo so context can be seen there
+			$GIT format-patch --stdout -1 $upstream_commit | diff -Nar -u0 - $patch
+		else
+			# There is a no queued repo so better to show some context in diff
+			$GIT format-patch --stdout -1 $upstream_commit | diff -Naur - $patch
+		fi
 	fi
 }
diff --git a/lib.sh b/lib.sh
index bf955cd..0c31689 100644
--- a/lib.sh
+++ b/lib.sh
@@ -6,4 +6,7 @@ GIT="git --git-dir=$DPDK_DIR/.git"
 SIGNATURE="Kevin Traynor"
 SIGN_TAG="no"
+# If there is a repo that contains the queue of patches for a stable
+# branch, then add the URL below and it will be referenced in 2-send-notice
+QUEUED_REPO="none"
 # If set to yes, commits with a Fixes: line that applies to a newer
 # release will be automatically pruned.
-- 
2.20.1


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

* Re: [dpdk-stable] [PATCH] 2-send-notice: add option for queued patch repo and remove context
  2019-04-30 17:31 [dpdk-stable] [PATCH] 2-send-notice: add option for queued patch repo and remove context Kevin Traynor
@ 2019-05-01 10:31 ` Kevin Traynor
  2019-05-01 10:52 ` [dpdk-stable] [PATCH v2] " Kevin Traynor
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Traynor @ 2019-05-01 10:31 UTC (permalink / raw)
  To: stable, bluca, yskoh

On 30/04/2019 18:31, Kevin Traynor wrote:
> The diff at the end can be difficult to read. Add an option to have
> a personal repo with the queued patches, and when available reduce the
> email diff context to zero.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---

self NAK. Will post a v2 with a direct link to the commit and remove
some local customisations that crept in.

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

* [dpdk-stable] [PATCH v2] 2-send-notice: add option for queued patch repo and remove context
  2019-04-30 17:31 [dpdk-stable] [PATCH] 2-send-notice: add option for queued patch repo and remove context Kevin Traynor
  2019-05-01 10:31 ` Kevin Traynor
@ 2019-05-01 10:52 ` Kevin Traynor
  2019-05-02 20:10   ` Luca Boccassi
  1 sibling, 1 reply; 4+ messages in thread
From: Kevin Traynor @ 2019-05-01 10:52 UTC (permalink / raw)
  To: stable, bluca, yskoh; +Cc: Kevin Traynor

The diff of patches can be difficult to read. Add an option to have
a personal repo with the queued patches.

If available it will add to the 2-send-notice emails like this:
-
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/858ffc60a46052dadb106411868a3b2572d86ef3
-

It will also remove the context from the email diff of patches.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
v2: add direct link to commit in queued repo

 README         |  7 +++++++
 compose-notice | 24 +++++++++++++++++++++++-
 lib.sh         |  3 +++
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/README b/README
index bef3762..ec9c899 100644
--- a/README
+++ b/README
@@ -81,4 +81,11 @@ This will create .patch files located in stable-scripts/<release>/mail which can
 then be sent with git send-email to the authors and stable@dpdk.org.
 
+As part of this email a diff is provided between the master and stable branch
+patches. As there are diffs in the patches and diffs between the patches, it
+can be hard to see how the patch will look in the repo when there are rebase
+changes. To aid this, a personal repo like github can be used to store the queued
+patches and it can be referenced in the email. If it is available it is set it
+in lib.sh with QUEUED_REPO.
+
 3-request-backport
 ==================
diff --git a/compose-notice b/compose-notice
index 95260bd..21cbc68 100644
--- a/compose-notice
+++ b/compose-notice
@@ -33,4 +33,5 @@ construct_header()
 construct_notice()
 {
+	stable_commit=$(grep "^From " $patch | awk '{ print $2 }')
 	cat << EOF
 Hi,
@@ -46,4 +47,18 @@ to the branch. If the code is different (ie: not only metadata diffs), due for e
 a change in context or macro names, please double check it.
 
+EOF
+
+if [ "$QUEUED_REPO" != "none" ]
+then
+	cat << EOF
+Queued patches are on a temporary branch at:
+${QUEUED_REPO}
+
+This queued commit can be viewed at:
+${QUEUED_REPO}/commit/$stable_commit
+
+EOF
+fi
+	cat << EOF
 Thanks.
 
@@ -67,5 +82,12 @@ construct_diff_of_diff()
 		echo "  Diff of the applied patch vs upstream commit (please double-check if non-empty:"
 		echo "---"
-		$GIT format-patch --stdout -1 $upstream_commit | diff -Naur - $patch
+		if [ "$QUEUED_REPO" != "none" ]
+		then
+			# There is a queued repo so context can be seen there
+			$GIT format-patch --stdout -1 $upstream_commit | diff -Nar -u0 - $patch
+		else
+			# There is a no queued repo so better to show some context in diff
+			$GIT format-patch --stdout -1 $upstream_commit | diff -Naur - $patch
+		fi
 	fi
 }
diff --git a/lib.sh b/lib.sh
index 42d0669..0af23b4 100644
--- a/lib.sh
+++ b/lib.sh
@@ -6,4 +6,7 @@ GIT="git --git-dir=$DPDK_DIR/.git"
 SIGNATURE="PLACEHOLDER"
 SIGN_TAG="no"
+# If there is a repo that contains the queue of patches for a stable
+# branch, then add the URL below and it will be referenced in 2-send-notice
+QUEUED_REPO="none"
 # If set to yes, commits with a Fixes: line that applies to a newer
 # release will be automatically pruned.
-- 
2.20.1


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

* Re: [dpdk-stable] [PATCH v2] 2-send-notice: add option for queued patch repo and remove context
  2019-05-01 10:52 ` [dpdk-stable] [PATCH v2] " Kevin Traynor
@ 2019-05-02 20:10   ` Luca Boccassi
  0 siblings, 0 replies; 4+ messages in thread
From: Luca Boccassi @ 2019-05-02 20:10 UTC (permalink / raw)
  To: Kevin Traynor, stable, yskoh

On Wed, 2019-05-01 at 11:52 +0100, Kevin Traynor wrote:
> The diff of patches can be difficult to read. Add an option to have
> a personal repo with the queued patches.
> 
> If available it will add to the 2-send-notice emails like this:
> -
> Queued patches are on a temporary branch at:
> https://github.com/kevintraynor/dpdk-stable-queue
> 
> 
> This commit can be viewed at:
> https://github.com/kevintraynor/dpdk-stable-queue/commit/858ffc60a46052dadb106411868a3b2572d86ef3
> 
> -
> 
> It will also remove the context from the email diff of patches.
> 
> Signed-off-by: Kevin Traynor <
> ktraynor@redhat.com
> >
> ---
> v2: add direct link to commit in queued repo
> 
>  README         |  7 +++++++
>  compose-notice | 24 +++++++++++++++++++++++-
>  lib.sh         |  3 +++
>  3 files changed, 33 insertions(+), 1 deletion(-)

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2019-05-02 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 17:31 [dpdk-stable] [PATCH] 2-send-notice: add option for queued patch repo and remove context Kevin Traynor
2019-05-01 10:31 ` Kevin Traynor
2019-05-01 10:52 ` [dpdk-stable] [PATCH v2] " Kevin Traynor
2019-05-02 20:10   ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).