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