Fix incorrect rfc.sh and checkpatch.pl use of "jenkins" instead of "gerrit"
authorJustin Clift <justin@gluster.org>
Sun, 12 Apr 2015 15:23:55 +0000 (16:23 +0100)
committerVijay Bellur <vbellur@redhat.com>
Mon, 13 Apr 2015 11:10:07 +0000 (11:10 +0000)
Change-Id: I6e78477554097a2be5aad8e3fb196970fb30dac2
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/10203
Tested-by: NetBSD Build System
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
extras/checkpatch.pl
rfc.sh

index 7402e2a65564331025f654c1df157a3de3a82b97..5a314258142f23efbfbc66914d83069cc27272af 100755 (executable)
@@ -44,7 +44,7 @@ my $configuration_file = ".checkpatch.conf";
 my $max_line_length = 80;
 my $ignore_perl_version = 0;
 my $minimum_perl_version = 5.10.0;
-my $jenkins_url = $ENV{JENKINS_URL};
+my $gerrit_url = $ENV{GERRIT_URL};
 
 sub help {
     my ($exitcode) = @_;
@@ -57,7 +57,7 @@ Options:
   -q, --quiet                quiet
   --patch                    treat FILE as patchfile (default)
   --emacs                    emacs compile window format
-  --jenkins-url=STRING       provide URL patch was reviewed on
+  --gerrit-url=STRING        URL the patch was reviewed at
   --terse                    one line per report
   -f, --file                 treat FILE as regular source file
   --subjective, --strict     enable more subjective tests
@@ -121,7 +121,7 @@ GetOptions(
     'q|quiet+'  => \$quiet,
     'patch!'    => \$chk_patch,
     'emacs!'    => \$emacs,
-    'jenkins-url=s' => \$jenkins_url,
+    'gerrit-url=s' => \$gerrit_url,
     'terse!'    => \$terse,
     'f|file!'   => \$file,
     'subjective!'       => \$check,
@@ -1951,11 +1951,11 @@ sub process {
                 }
             }
 
-            # Check if email is really Jenkins URL
+            # Check if email is really Gerrit URL
             if ($email =~ /^($url_tags)(.*)/) {
                 my $uri = $1;
                 my $url = $2;
-                if ($uri && $url !~ /$jenkins_url/) {
+                if ($uri && $url !~ /$gerrit_url/) {
                     ERROR("BAD_URL",
                           "Unrecognized url address: '$email'\n" . $herecurr);
                 }
diff --git a/rfc.sh b/rfc.sh
index 5528629c7fe033fa64ec956acf58067e136f9863..287768eae8b9cf2466ce0dec3a9f9b2db2822d77 100755 (executable)
--- a/rfc.sh
+++ b/rfc.sh
@@ -82,6 +82,7 @@ assert_diverge()
     git diff origin/$branch..HEAD | grep -q .;
 }
 
+
 check_patches_for_coding_style()
 {
     git fetch origin;
@@ -92,8 +93,8 @@ check_patches_for_coding_style()
         exit 1
     fi
 
-    ## Set this to known value once Jenkins URL changes
-    export JENKINS_URL="review.gluster.org"
+    # The URL of our Gerrit server
+    export GERRIT_URL="review.gluster.org"
 
     echo "Running coding guidelines check ..."
     head=$(git rev-parse --abbrev-ref HEAD)
@@ -104,13 +105,13 @@ check_patches_for_coding_style()
     if [ "$RES" -eq 1 ] ; then
         echo "Errors caught, get details by:"
         echo "  git format-patch --stdout  origin/${branch}..${head} \\"
-        echo "  | ./extras/checkpatch.pl --jenkins-url ${JENKINS_URL} -"
+        echo "  | ./extras/checkpatch.pl --gerrit-url ${GERRIT_URL} -"
         echo "and correct errors"
         exit 1
     elif [ "$RES" -eq 2 ] ; then
         echo "Warnings caught, get details by:"
         echo "  git format-patch --stdout  origin/${branch}..${head} \\"
-        echo "  | ./extras/checkpatch.pl --jenkins-url ${JENKINS_URL} -"
+        echo "  | ./extras/checkpatch.pl --gerrit-url ${GERRIT_URL} -"
         echo -n "Do you want to continue anyway [no/yes]: "
         read yesno
         if [ "${yesno}" != "yes" ] ; then
@@ -120,6 +121,7 @@ check_patches_for_coding_style()
     fi
 }
 
+
 main()
 {
     set_hooks_commit_msg;