From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 0AAE33858D39; Mon, 24 Jan 2022 12:45:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0AAE33858D39 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-10416] gcc-changelog: sync from master. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 15ddbe7c76c1d57b7c1474ddfecb81e8b12d928f X-Git-Newrev: 1f49357ce9802d0d56100d27ee365b25a7d93362 Message-Id: <20220124124545.0AAE33858D39@sourceware.org> Date: Mon, 24 Jan 2022 12:45:45 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2022 12:45:45 -0000 https://gcc.gnu.org/g:1f49357ce9802d0d56100d27ee365b25a7d93362 commit r10-10416-g1f49357ce9802d0d56100d27ee365b25a7d93362 Author: Martin Liska Date: Mon Jan 24 13:44:57 2022 +0100 gcc-changelog: sync from master. contrib/ChangeLog: * gcc-changelog/git_commit.py: Sync from master. * gcc-changelog/test_email.py: Likewise. * gcc-changelog/test_patches.txt: Likewise. Diff: --- contrib/gcc-changelog/git_commit.py | 12 +++-- contrib/gcc-changelog/test_email.py | 5 +++ contrib/gcc-changelog/test_patches.txt | 82 ++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 3 deletions(-) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 27a1d59b211..95dc49e5d48 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -718,9 +718,15 @@ class GitCommit: self.changelog_entries.append(entry) # strip prefix of the file assert file.startswith(entry.folder) - file = file[len(entry.folder):].lstrip('/') - entry.lines.append('\t* %s: New file.' % file) - entry.files.append(file) + # do not allow auto-addition of New files + # for the top-level folder + if entry.folder: + file = file[len(entry.folder):].lstrip('/') + entry.lines.append('\t* %s: New file.' % file) + entry.files.append(file) + else: + msg = 'new file in the top-level folder not mentioned in a ChangeLog' + self.errors.append(Error(msg, file)) else: used_pattern = [p for p in mentioned_patterns if file.startswith(p)] diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py index a4796dbbe94..c56f6da513a 100755 --- a/contrib/gcc-changelog/test_email.py +++ b/contrib/gcc-changelog/test_email.py @@ -446,3 +446,8 @@ class TestGccChangelog(unittest.TestCase): email = self.from_patch_glob('non-ascii-email.patch') assert (email.errors[0].message == 'non-ASCII characters in git commit email address (jbglaw@ług-owl.de)') + + def test_new_file_in_root_folder(self): + email = self.from_patch_glob('toplev-new-file.patch') + assert (email.errors[0].message == + 'new file in the top-level folder not mentioned in a ChangeLog') diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt index 98a0d3f1ee0..95ad961f2d3 100644 --- a/contrib/gcc-changelog/test_patches.txt +++ b/contrib/gcc-changelog/test_patches.txt @@ -3489,3 +3489,85 @@ index 2a9917cde62..0033b0004b3 100644 @@ -0,0 +1,1 @@ + -- + +=== toplev-new-file.patch === +From 05e37b6e65027188f08e6374c7d356d75b54738e Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Mon, 24 Jan 2022 12:46:27 +0100 +Subject: [PATCH] New file. + +ChangeLog: + + * Makefile.in: Update. + +gcc/ChangeLog: + + * ipa-icf.cc: Update. +--- + Makefile.am | 1 + + Makefile.in | 1 + + gcc/ipa-icf.cc | 1 + + gcc/ipa-icf2.cc | 1 + + 4 files changed, 4 insertions(+) + create mode 100644 Makefile.am + create mode 100644 gcc/ipa-icf2.cc + +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +index 00000000000..f0129caae3d +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1 @@ ++new file. +diff --git a/Makefile.in b/Makefile.in +index 79c77fccf0f..7a090030119 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,4 +1,5 @@ + ++ + # Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. + # + # Makefile for directory with subdirs to build. +diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc +index 765ae746745..15735b6684f 100644 +--- a/gcc/ipa-icf.cc ++++ b/gcc/ipa-icf.cc +@@ -1,3 +1,4 @@ ++ + /* Interprocedural Identical Code Folding pass + Copyright (C) 2014-2022 Free Software Foundation, Inc. + +diff --git a/gcc/ipa-icf2.cc b/gcc/ipa-icf2.cc +new file mode 100644 +index 00000000000..c49c556e0e4 +--- /dev/null ++++ b/gcc/ipa-icf2.cc +@@ -0,0 +1 @@ ++tt +-- +2.34.1 + +From 80c9d63af350b280bfccb82adb3867c25a25e6d0 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Mon, 24 Jan 2022 12:17:09 +0100 +Subject: [PATCH] Add Makefile.am file. + +Foo bar. + +ChangeLog: + +--- + Makefile.am | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) + create mode 100644 Makefile.am + +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +index 00000000000..d6459e00543 +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1 @@ ++xxx +-- +2.34.1