From patchwork Mon Dec 19 13:40:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 34546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2393105wrn; Mon, 19 Dec 2022 05:41:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5M9dyBxNBt8As1PbJfC4VghbLFH1QeHi+qtsBAFUuSxdbmQb+/hI5hK7wEN1PJh5y8Muqq X-Received: by 2002:a17:907:397:b0:7c1:58cb:86b9 with SMTP id ss23-20020a170907039700b007c158cb86b9mr30351693ejb.28.1671457263706; Mon, 19 Dec 2022 05:41:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671457263; cv=none; d=google.com; s=arc-20160816; b=Cq34ph3NIr2flQqBmqHaJBfI4BqIQwoXgSQtqD+AOiwlFVuB3RlNSktKQSRS1kSuGX HnBDNBL0+HCiSdgMyv4Uve8cDQ/GrRIEbjfYsDeHvCggVmZRFsdpdCtVyi1STF68w6OO UO3atDpz0SDtTwPnAIuvxhgT9G0amQBsgIDoTRIV11KoKhPVzAHoIrPbx+DjGvuja0ol 0r+4jH45XwD64z4c9xTyYCaUqZJw6sjI2FS8ATrCXfWhVfzhOAm7jGpJPSw3D7ktTX2I +GYk7w94rw4M72CpNoy45lSq9mRRAciUfERiSXv6CJI8pLamr5Wjl/kEsngGqBljNG+N F5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding:cc :content-language:to:subject:from:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=Kzlq05VYznScDwX+gMCNFzdpJta8n1eeLaSnri8NJqQ=; b=wI+bGop6dw3H2hcRqZrGzctNDt9cZrHMOzme7FIXSYCX4V3Qt86oO6+Y1/M4iyFNnf DFhPMniJxngXU6t8Fp1n7siH46+6/tl/nZoVwNtU2KGjyafNF9hlRiLV24AJ6C9DuoGw 4fOBXAiC5THf6k7frvJXpNBe662C6EQDDP3yQ+V05I3fHXACM4yPQ1Nqf59ObOjXecxA bKDXGxiEtAKU1t/s7Xud9q9Dal4h4+ezD+Uf8mjcXyMbbC9fmnUSUpZNxUsboty1u/ca BO9CRBcBfZqoql7TxVKHDqpxo7QxTcJd6lP6sSNDii5YB6Am0UsWzGty0ofefoVR2gRe 1XBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=O5XvrklU; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=szE+jlRX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l4-20020a170906414400b007bb286800d4si7107581ejk.886.2022.12.19.05.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 05:41:03 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=O5XvrklU; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=szE+jlRX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B1ECC3858409 for ; Mon, 19 Dec 2022 13:40:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 753D73858D1E for ; Mon, 19 Dec 2022 13:40:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 753D73858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 223A860501; Mon, 19 Dec 2022 13:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1671457230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kzlq05VYznScDwX+gMCNFzdpJta8n1eeLaSnri8NJqQ=; b=O5XvrklUir2AopvpK0634FdZlMiUIZJs/qH5SSHQLYims04IlSA5nS7l6oHZnzbnAJJlcm DkaJJEz2ByPe7HjavxtYsQPV00rfBwGV1zcyn2Z5SbGKpuBLxNTMOMjt5SsEaQeNbdhM+4 0f3klIvfKaIyFeu+XnQM3Bn6f7U+RyY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1671457230; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kzlq05VYznScDwX+gMCNFzdpJta8n1eeLaSnri8NJqQ=; b=szE+jlRXVYBYw9mkFM7cR8ScPpVuqiRi4q34UbcWa71qcwPz5E/fMxgYdPZkZI5vvt7i9R 5BgvwYc3l9aWKABQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 109B313910; Mon, 19 Dec 2022 13:40:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 7owZA85poGOyIQAAMHmgww (envelope-from ); Mon, 19 Dec 2022 13:40:30 +0000 Message-ID: <0b81f2a6-f80a-f28e-c731-5086b436e26a@suse.cz> Date: Mon, 19 Dec 2022 14:40:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH (pushed)] gcc-changelog: allow digit in component name To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: Jakub Jelinek X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752649971808699522?= X-GMAIL-MSGID: =?utf-8?q?1752649971808699522?= contrib/ChangeLog: * gcc-changelog/git_commit.py: Allow digit in component name. contrib/ChangeLog: * gcc-changelog/test_email.py: Add new test. * gcc-changelog/test_patches.txt: Add new patch. --- contrib/gcc-changelog/git_commit.py | 2 +- contrib/gcc-changelog/test_email.py | 4 ++++ contrib/gcc-changelog/test_patches.txt | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index e82fbcacd3e..7fde02cba85 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -165,7 +165,7 @@ additional_author_regex = re.compile(r'^\t(?P\ *)?(?P.* <.*>)') changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?') subject_pr_regex = re.compile(r'(^|\W)PR\s+(?P[a-zA-Z+-]+)/(?P\d{4,7})') subject_pr2_regex = re.compile(r'[(\[]PR\s*(?P\d{4,7})[)\]]') -pr_regex = re.compile(r'\tPR (?P[a-z+-]+\/)?(?P[0-9]+)$') +pr_regex = re.compile(r'\tPR (?P[a-z0-9+-]+\/)?(?P[0-9]+)$') dr_regex = re.compile(r'\tDR ([0-9]+)$') star_prefix_regex = re.compile(r'\t\*(?P\ *)(?P.*)') end_of_location_regex = re.compile(r'[\[<(:]') diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py index 79f8e0b8604..3e311d8d0f1 100755 --- a/contrib/gcc-changelog/test_email.py +++ b/contrib/gcc-changelog/test_email.py @@ -475,3 +475,7 @@ class TestGccChangelog(unittest.TestCase): assert (len(email.warnings) == 2) assert (email.warnings[0] == "Auto-added new file 'gcc/doc/gm2.texi'") assert (email.warnings[1] == "Auto-added 2 new files in 'gcc/m2'") + + def test_digit_in_PR_component(self): + email = self.from_patch_glob('modula-PR-component.patch') + assert not email.errors diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt index 6004608a8f9..8bbd341c399 100644 --- a/contrib/gcc-changelog/test_patches.txt +++ b/contrib/gcc-changelog/test_patches.txt @@ -3732,3 +3732,28 @@ index 00000000000..649af5e573a +GCC RUNTIME LIBRARY EXCEPTION -- 2.25.1 + +=== modula-PR-component.patch === +From 1052d89a0b9769453561e18da32b1558d059b320 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Mon, 19 Dec 2022 14:34:18 +0100 +Subject: [PATCH] gcc-changelog: allow digit in component name + + PR modula2/123456 + +contrib/ChangeLog: + + * gcc-changelog/git_commit.py: Allow digit in component name. +--- + contrib/gcc-changelog/git_commit.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py +index e82fbcacd3e..7fde02cba85 100755 +--- a/contrib/gcc-changelog/git_commit.py ++++ b/contrib/gcc-changelog/git_commit.py +@@ -0,0 +1,1 @@ ++ GNU Free Documentation License +-- +2.39.0 +