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