summaryrefslogtreecommitdiff
path: root/contrib/mklog.py
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-05-13 15:12:36 +0200
committerMartin Liska <mliska@suse.cz>2021-05-13 15:13:31 +0200
commitfef084dc83d38cad32604bb1cee4caf42ffeec12 (patch)
treef08084fcae12e4693e473e8cce902ea6e57fb0bc /contrib/mklog.py
parenta451598b2c02e1ca3c62fea272d73a9f31922252 (diff)
downloadgcc-fef084dc83d38cad32604bb1cee4caf42ffeec12.tar.gz
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.
Diffstat (limited to 'contrib/mklog.py')
-rwxr-xr-xcontrib/mklog.py10
1 files changed, 8 insertions, 2 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)