aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-02-08 18:42:08 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2021-02-24 17:55:19 +0100
commit0633ac5d5369580c6d9c366aa70fbfd0c61f42a7 (patch)
tree17a9f10edb024f02c24844b542f428f1ab980d11
parentbcf7bb94433c195c6fffa4f388ce963edcb8119e (diff)
downloadpw-0633ac5d5369580c6d9c366aa70fbfd0c61f42a7.tar.gz
pw: add big fat warning when applying incomplete series
Sometimes patchwork doesn't recognize all patches in a series but they still apply and work. Warn about incomplete series. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--lib.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib.sh b/lib.sh
index b310d7e..1db0e8e 100644
--- a/lib.sh
+++ b/lib.sh
@@ -3,6 +3,12 @@
#
# Copyright (C) 2020 Jakub Kicinski <kuba@kernel.org>
+red()
+{
+ echo -n -e "\e[1;31m$@"
+ [ ! -z "$@" ] && echo -n -e "\e[0m"
+}
+
bold()
{
echo -n -e "\e[1m$@"
@@ -71,6 +77,7 @@ pw_series_print_short()
cnt=$(echo "$series_json" | jq -r '.patches | length')
author=$(echo "$series_json" | jq -r '.submitter.name')
ver=$(echo "$series_json" | jq -r '.version')
+ complete=$(echo "$series_json" | jq -r '.received_all')
date=$(echo "$series_json" | jq -r '.date')
date="$date UTC"
@@ -81,6 +88,12 @@ pw_series_print_short()
resend=$(echo "$patch_subj" | sed -n 's/.*resend.*/r/Ip')
bold "By: $author Age: $age Tree: $tree Version: $ver$resend Patches: $cnt\n"
+ if [ "$complete" != true ]; then
+ red
+ bold
+ echo "WARNING: Series is not complete"
+ normal
+ fi
echo "-----"
if [ "$cover_letter" != "null" ]; then