|
|
9f5ccc |
From 1f03327887645be2500cd29f69f7a77a4f5d0164 Mon Sep 17 00:00:00 2001
|
|
|
9f5ccc |
From: Rinku Kothiya <rkothiya@redhat.com>
|
|
|
9f5ccc |
Date: Mon, 18 Nov 2019 14:25:12 -0500
|
|
|
9f5ccc |
Subject: [PATCH 318/335] Update rfc.sh to rhgs-3.5.1
|
|
|
9f5ccc |
|
|
|
9f5ccc |
Removed the checks for updates and fixes from rfc.sh
|
|
|
9f5ccc |
|
|
|
9f5ccc |
Label: DOWNSTREAM ONLY
|
|
|
9f5ccc |
|
|
|
9f5ccc |
Change-Id: I436c959aa3b3366cd313b29f41c2466c4072efd7
|
|
|
9f5ccc |
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
|
|
|
9f5ccc |
---
|
|
|
9f5ccc |
rfc.sh | 47 ++++++++---------------------------------------
|
|
|
9f5ccc |
1 file changed, 8 insertions(+), 39 deletions(-)
|
|
|
9f5ccc |
|
|
|
9f5ccc |
diff --git a/rfc.sh b/rfc.sh
|
|
|
9f5ccc |
index 69ddd2b..918fb11 100755
|
|
|
9f5ccc |
--- a/rfc.sh
|
|
|
9f5ccc |
+++ b/rfc.sh
|
|
|
9f5ccc |
@@ -129,13 +129,8 @@ editor_mode()
|
|
|
9f5ccc |
|
|
|
9f5ccc |
if [ $(basename "$1") = "COMMIT_EDITMSG" ]; then
|
|
|
9f5ccc |
# see note above function warn_reference_missing for regex elaboration
|
|
|
9f5ccc |
- # Lets first check for github issues
|
|
|
9f5ccc |
- ref=$(git log -n1 --format='%b' | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+(gluster\/glusterfs)?#[[:digit:]]+" | awk -F '#' '{print $2}');
|
|
|
9f5ccc |
- if [ "x${ref}" = "x" ]; then
|
|
|
9f5ccc |
- # if not found, check for bugs
|
|
|
9f5ccc |
- ref=$(git log -n1 --format='%b' | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F '#' '{print $2}');
|
|
|
9f5ccc |
- fi
|
|
|
9f5ccc |
|
|
|
9f5ccc |
+ ref=$(git log -n1 --format='%b' | grep -ow -E "^[bB][uU][gG](:)[[:space:]]+[[:digit:]]+")
|
|
|
9f5ccc |
if [ "x${ref}" != "x" ]; then
|
|
|
9f5ccc |
return;
|
|
|
9f5ccc |
fi
|
|
|
9f5ccc |
@@ -157,16 +152,6 @@ editor_mode()
|
|
|
9f5ccc |
bz_string=""
|
|
|
9f5ccc |
fi
|
|
|
9f5ccc |
|
|
|
9f5ccc |
- echo "Select yes '(y)' if this patch fixes the bug/feature completely,"
|
|
|
9f5ccc |
- echo -n "or is the last of the patchset which brings feature (Y/n): "
|
|
|
9f5ccc |
- read fixes
|
|
|
9f5ccc |
- fixes_string="fixes"
|
|
|
9f5ccc |
- if [ "${fixes}" = 'N' ] || [ "${fixes}" = 'n' ]; then
|
|
|
9f5ccc |
- fixes_string="updates"
|
|
|
9f5ccc |
- fi
|
|
|
9f5ccc |
-
|
|
|
9f5ccc |
- sed "/^Change-Id:/{p; s/^.*$/${fixes_string}: ${bz_string}#${bug}/;}" $1 > $1.new && \
|
|
|
9f5ccc |
- mv $1.new $1;
|
|
|
9f5ccc |
return;
|
|
|
9f5ccc |
done
|
|
|
9f5ccc |
fi
|
|
|
9f5ccc |
@@ -234,8 +219,8 @@ check_patches_for_coding_style()
|
|
|
9f5ccc |
# IOW, the above helps us find the pattern with leading or training spaces
|
|
|
9f5ccc |
# or non word consituents like , or ;
|
|
|
9f5ccc |
#
|
|
|
9f5ccc |
-# [fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])
|
|
|
9f5ccc |
-# Finds 'fixes' OR 'updates' in any case combination
|
|
|
9f5ccc |
+# [bB][uU][gG]
|
|
|
9f5ccc |
+# Finds 'bug' in any case
|
|
|
9f5ccc |
#
|
|
|
9f5ccc |
# (:)?
|
|
|
9f5ccc |
# Followed by an optional : (colon)
|
|
|
9f5ccc |
@@ -256,28 +241,11 @@ warn_reference_missing()
|
|
|
9f5ccc |
echo ""
|
|
|
9f5ccc |
echo "=== Missing a reference in commit! ==="
|
|
|
9f5ccc |
echo ""
|
|
|
9f5ccc |
- echo "Gluster commits are made with a reference to a bug or a github issue"
|
|
|
9f5ccc |
- echo ""
|
|
|
9f5ccc |
- echo "Submissions that are enhancements (IOW, not functional"
|
|
|
9f5ccc |
- echo "bug fixes, but improvements of any nature to the code) are tracked"
|
|
|
9f5ccc |
- echo "using github issues [1]."
|
|
|
9f5ccc |
+ echo "You must give BUG: <bugid>"
|
|
|
9f5ccc |
echo ""
|
|
|
9f5ccc |
- echo "Submissions that are bug fixes are tracked using Bugzilla [2]."
|
|
|
9f5ccc |
+ echo "for example:"
|
|
|
9f5ccc |
echo ""
|
|
|
9f5ccc |
- echo "A check on the commit message, reveals that there is no bug or"
|
|
|
9f5ccc |
- echo "github issue referenced in the commit message"
|
|
|
9f5ccc |
- echo ""
|
|
|
9f5ccc |
- echo "[1] https://github.com/gluster/glusterfs/issues/new"
|
|
|
9f5ccc |
- echo "[2] https://bugzilla.redhat.com/enter_bug.cgi?product=GlusterFS"
|
|
|
9f5ccc |
- echo ""
|
|
|
9f5ccc |
- echo "Please file an issue or a bug report and reference the same in the"
|
|
|
9f5ccc |
- echo "commit message using the following tags:"
|
|
|
9f5ccc |
- echo "GitHub Issues:"
|
|
|
9f5ccc |
- echo "\"Fixes: gluster/glusterfs#n\" OR \"Updates: gluster/glusterfs#n\","
|
|
|
9f5ccc |
- echo "\"Fixes: #n\" OR \"Updates: #n\","
|
|
|
9f5ccc |
- echo "Bugzilla ID:"
|
|
|
9f5ccc |
- echo "\"Fixes: bz#n\" OR \"Updates: bz#n\","
|
|
|
9f5ccc |
- echo "where n is the issue or bug number"
|
|
|
9f5ccc |
+ echo "BUG: 1234567"
|
|
|
9f5ccc |
echo ""
|
|
|
9f5ccc |
echo "You may abort the submission choosing 'N' below and use"
|
|
|
9f5ccc |
echo "'git commit --amend' to add the issue reference before posting"
|
|
|
9f5ccc |
@@ -312,7 +280,7 @@ main()
|
|
|
9f5ccc |
assert_diverge;
|
|
|
9f5ccc |
|
|
|
9f5ccc |
# see note above function warn_reference_missing for regex elaboration
|
|
|
9f5ccc |
- reference=$(git log -n1 --format='%b' | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+(gluster\/glusterfs)?(bz)?#[[:digit:]]+" | awk -F '#' '{print $2}');
|
|
|
9f5ccc |
+ reference=$(git log -n1 --format='%b' | grep -ow -E "^[bB][uU][gG](:)[[:space:]]+[[:digit:]]+" | awk '{print $2}')
|
|
|
9f5ccc |
|
|
|
9f5ccc |
# If this is a commit against master and does not have a bug ID or a github
|
|
|
9f5ccc |
# issue reference. Warn the contributor that one of the 2 is required
|
|
|
9f5ccc |
@@ -320,6 +288,7 @@ main()
|
|
|
9f5ccc |
warn_reference_missing;
|
|
|
9f5ccc |
fi
|
|
|
9f5ccc |
|
|
|
9f5ccc |
+
|
|
|
9f5ccc |
# TODO: add clang-format command here. It will after the changes are done everywhere else
|
|
|
9f5ccc |
clang_format=$(clang-format --version)
|
|
|
9f5ccc |
if [ ! -z "${clang_format}" ]; then
|
|
|
9f5ccc |
--
|
|
|
9f5ccc |
1.8.3.1
|
|
|
9f5ccc |
|