public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-771] mklog: Put detected PR entries before ChangeLogs
Date: Thu, 13 May 2021 13:14:19 +0000 (GMT)	[thread overview]
Message-ID: <20210513131419.26736385DC33@sourceware.org> (raw)

https://gcc.gnu.org/g:fef084dc83d38cad32604bb1cee4caf42ffeec12

commit r12-771-gfef084dc83d38cad32604bb1cee4caf42ffeec12
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 13 15:12:36 2021 +0200

    mklog: Put detected PR entries before ChangeLogs
    
    contrib/ChangeLog:
    
            * mklog.py: Put PR entries before all ChangeLog entries
            (will be added to all ChangeLog locations by Daily bump script).
            * test_mklog.py: Test the new behavior.

Diff:
---
 contrib/mklog.py      | 10 ++++++++--
 contrib/test_mklog.py |  7 +++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/contrib/mklog.py b/contrib/mklog.py
index 1604f0516d0..5c93c707128 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -169,13 +169,19 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False):
     if fill_pr_titles:
         out += get_pr_titles(prs)
 
+    # print list of PR entries before ChangeLog entries
+    if prs:
+        if not out:
+            out += '\n'
+        for pr in prs:
+            out += '\t%s\n' % pr
+        out += '\n'
+
     # sort ChangeLog so that 'testsuite' is at the end
     for changelog in sorted(changelog_list, key=lambda x: 'testsuite' in x):
         files = changelogs[changelog]
         out += '%s:\n' % os.path.join(changelog, 'ChangeLog')
         out += '\n'
-        for pr in prs:
-            out += '\t%s\n' % pr
         # new and deleted files should be at the end
         for file in sorted(files, key=sort_changelog_files):
             assert file.path.startswith(changelog)
diff --git a/contrib/test_mklog.py b/contrib/test_mklog.py
index 7e95ec1a2ab..a0670dac119 100755
--- a/contrib/test_mklog.py
+++ b/contrib/test_mklog.py
@@ -317,9 +317,10 @@ index 00000000000..dcc8999c446
 EXPECTED5 = '''\
 PR target/95046 - Vectorize V2SFmode operations
 
+	PR target/95046
+
 gcc/testsuite/ChangeLog:
 
-	PR target/95046
 	* gcc.target/i386/pr95046-6.c: New test.
 
 '''
@@ -377,9 +378,11 @@ index 00000000000..f3d6d11e61e
 '''
 
 EXPECTED7 = '''\
-gcc/testsuite/ChangeLog:
 
 	DR 2237
+
+gcc/testsuite/ChangeLog:
+
 	* g++.dg/DRs/dr2237.C: New test.
 
 '''


                 reply	other threads:[~2021-05-13 13:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210513131419.26736385DC33@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).