public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] contrib/gcc-changelog: Skip over review lines
@ 2020-08-22 21:25 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 21:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:48acb8fcd1f7ec02391dde92c8b074f49736809a

commit 48acb8fcd1f7ec02391dde92c8b074f49736809a
Author: Frederik Harwath <frederik@codesourcery.com>
Date:   Tue May 19 11:15:28 2020 +0200

    contrib/gcc-changelog: Skip over review lines
    
    git-check-commit.py does not know about "Reviewed-by",
    "Reviewed-on", and "Signed-off-by" lines and hence it
    expects those lines which follow the ChangeLog entries
    to be indented by a tab.
    
    This commit makes the script skip those lines.  No further
    processing is attempted because the review information
    is not part of the ChangeLogs.
    
    contrib/
    
    2020-05-20  Frederik Harwath  <frederik@codesourcery.com>
    
            * gcc-changelog/git_commit.py: Skip over lines starting
            with "Reviewed-by: ", "Reviewed-on: ", or "Signed-off-by: "

Diff:
---
 contrib/ChangeLog                   |  5 +++++
 contrib/gcc-changelog/git_commit.py | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index b799a283f34..faa56374669 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-20  Frederik Harwath  <frederik@codesourcery.com>
+
+	* gcc-changelog/git_commit.py: Skip over lines starting
+	with "Reviewed-by: ", "Reviewed-on: ", or "Signed-off-by: "
+
 2020-05-20  Martin Liska  <mliska@suse.cz>
 
 	* gcc-changelog/git_check_commit.py: Change
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 5cc8c4f5935..c9b849706c4 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -151,7 +151,12 @@ LINE_LIMIT = 100
 TAB_WIDTH = 8
 CO_AUTHORED_BY_PREFIX = 'co-authored-by: '
 CHERRY_PICK_PREFIX = '(cherry picked from commit '
+REVIEWED_BY_PREFIX = 'reviewed-by: '
+REVIEWED_ON_PREFIX = 'reviewed-on: '
+SIGNED_OFF_BY_PREFIX = 'signed-off-by: '
 
+REVIEW_PREFIXES = (REVIEWED_BY_PREFIX, REVIEWED_ON_PREFIX,\
+                   SIGNED_OFF_BY_PREFIX)
 
 class Error:
     def __init__(self, message, line=None):
@@ -345,11 +350,15 @@ class GitCommit:
                     else:
                         pr_line = line.lstrip()
 
-                if line.lower().startswith(CO_AUTHORED_BY_PREFIX):
+
+                lowered_line = line.lower()
+                if lowered_line.startswith(CO_AUTHORED_BY_PREFIX):
                     name = line[len(CO_AUTHORED_BY_PREFIX):]
                     author = self.format_git_author(name)
                     self.co_authors.append(author)
                     continue
+                elif lowered_line.startswith(REVIEW_PREFIXES):
+                    continue
                 elif line.startswith(CHERRY_PICK_PREFIX):
                     continue


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-22 21:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 21:25 [gcc/devel/autopar_devel] contrib/gcc-changelog: Skip over review lines Giuliano Belinassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).