From patchwork Tue May 19 09:45:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederik Harwath X-Patchwork-Id: 1293162 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49R9x32Nbrz9sT8 for ; Tue, 19 May 2020 19:45:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE637393F844; Tue, 19 May 2020 09:45:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 453CF389201F for ; Tue, 19 May 2020 09:45:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 453CF389201F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Frederik_Harwath@mentor.com IronPort-SDR: eLK11txQMvMseSlHAgSkQfX5JYH2EyiuXMGdqM4IIZ3X3kKGU717X3st33SmgRZMbREIOTJ3NG K5Y3PF6+qt2OPkOVkQ2oIYE9PZO+1IBmfr8JCQ4M0LKxiNBSnxqy1iaSkjq6cpHcBlgmKkQ3Dc S7IyaSsPeC4r6R5gwdt2tuZPAYUtfPm7R6fMjnPaKHDrXFD3om2+Mbz5bXSjsbigzdLAI2I866 vRXVv/VEqMINtotjt1z2159kaG3bzTyaAj0PyueEyXgEcAB+wRsYtH4sExZ75ZS2WFYlEvdJom +f8= X-IronPort-AV: E=Sophos;i="5.73,409,1583222400"; d="scan'208,223";a="49034871" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 19 May 2020 01:45:16 -0800 IronPort-SDR: x/Tqy4EEhn5kw3oOCVaxi5E0NeouhLUYBw07jDnxxmpSjJf3N9zkyBBLtK95eEz8oR3+sFfMLy 9iEJBhBZycoFYGFYarm5GwrikAIBguz2aqPN4qaVPDbjIDSwahy6+opQypdAg4RyLFxF7Fv7b9 Re2YD0RGqM/qh3rE/gWBKLNBCNN1qEU3ZK03hgtwwvKTe6jYPRJVkKQtOQjph524wuO88nF9Or PfrVplT0wLhqjsT4mgQEsChYyWM1+j+z+BjcRBxAqMXrfEU21BDLXlSprBRXRLH32AxLqGDfM0 RT0= From: Frederik Harwath To: Martin Liska , Subject: [PATCH] contrib/gcc-changelog: Handle Reviewed-{by,on} Date: Tue, 19 May 2020 11:45:10 +0200 Message-ID: MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, the new contrib/gcc-changelog/git_check_commit.py script (which, by the way, is very useful!) does not handle "Reviewed-by" and "Reviewed-on" lines yet and hence it expects those lines to be indented by a tab although those lines are usually not indented. The script already knows about "Co-Authored-By" lines and I have extended it to handle the "Reviewed-{by,on}" lines in a similar way. The information from those lines is not processed further since the review information apparantly does not get included in the ChangeLogs. Ok to commit the patch? Best regards, Frederik ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter From 0dc9b201bc1607de36cb9b3604a87cc3646292e3 Mon Sep 17 00:00:00 2001 From: Frederik Harwath Date: Tue, 19 May 2020 11:15:28 +0200 Subject: [PATCH] contrib/gcc-changelog: Handle Reviewed-{by,on} git-check-commit.py does not know about "Reviewed-by" and "Reviewed-on" 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-19 Frederik Harwath * gcc-changelog/git_commit.py: Skip over lines starting with "Reviewed-by: " or "Reviewed-on: ". --- contrib/gcc-changelog/git_commit.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 5214cc36538..ebcf853f02f 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -150,6 +150,8 @@ star_prefix_regex = re.compile(r'\t\*(?P\ *)(?P.*)') LINE_LIMIT = 100 TAB_WIDTH = 8 CO_AUTHORED_BY_PREFIX = 'co-authored-by: ' +REVIEWED_BY_PREFIX = 'reviewed-by: ' +REVIEWED_ON_PREFIX = 'reviewed-on: ' class Error: @@ -344,12 +346,19 @@ 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 + # Skip over review information for now. + # This avoids errors due to missing tabs on these lines below. + if lowered_line.startswith((REVIEWED_BY_PREFIX,\ + REVIEWED_ON_PREFIX)): + continue + # ChangeLog name will be deduced later if not last_entry: if author_tuple: -- 2.17.1