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