[dpdk-stable] [PATCH stable-scripts] Add diff-of-diff below backported patch to 2-notice

bluca at debian.org bluca at debian.org
Mon Aug 20 20:03:57 CEST 2018


From: Luca Boccassi <bluca at debian.org>

We noticed that it's not clear if a patch is cleanly cherry-picked or if
it gets adjusted due to merge conflicts.
This change will add to the backport notice email a diff-of-diffs, and
a note asking the developer/maintainer to review it.
This way it the work we do will be more transparent.

Signed-off-by: Luca Boccassi <bluca at debian.org>
---
 compose-notice | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/compose-notice b/compose-notice
index e5996f4..95260bd 100644
--- a/compose-notice
+++ b/compose-notice
@@ -41,6 +41,10 @@ Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
 It will be pushed if I get no objections before $(date --date="+2 days" "+%D"). So please
 shout if anyone has objections.
 $(cat notice-more 2>/dev/null | grep -v "^#")
+Also note that after the patch there's a diff of the upstream commit vs the patch applied
+to the branch. If the code is different (ie: not only metadata diffs), due for example to
+a change in context or macro names, please double check it.
+
 Thanks.
 
 ${SIGNATURE}
@@ -54,6 +58,19 @@ construct_patch()
 	cat $patch
 }
 
+construct_diff_of_diff()
+{
+	upstream_commit=$(grep "\[ upstream commit " $patch | sed "s/\[ upstream commit \(.*\) \]/\1/")
+	if [ -n "$upstream_commit" ]
+	then
+		echo "---"
+		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
+	fi
+}
+
 construct_header
 construct_notice
 construct_patch
+construct_diff_of_diff
-- 
2.18.0



More information about the stable mailing list