aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-06-09 10:01:05 +0200
committerMartin Liska <mliska@suse.cz>2020-06-09 10:01:52 +0200
commit4373fd2c7f7307f970df73a943e636b2b9d272b6 (patch)
tree4c9be71104c6dae96984751a09f0ddaa4487d4a9 /contrib/gcc-changelog/git_commit.py
parentd6dbb71e468d0db561cc9eca99eeaca1efb81c11 (diff)
downloadgcc-4373fd2c7f7307f970df73a943e636b2b9d272b6.zip
gcc-4373fd2c7f7307f970df73a943e636b2b9d272b6.tar.gz
gcc-4373fd2c7f7307f970df73a943e636b2b9d272b6.tar.bz2
gcc-changelog: fix deduction for root ChangeLog
contrib/ChangeLog: * gcc-changelog/git_commit.py: Fix ChangeLog regex in order to match the top-level ChangeLog. * gcc-changelog/test_email.py: Add test. * gcc-changelog/test_patches.txt: Likewise.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 069900d..f85d4c8 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -150,7 +150,7 @@ misc_files = [
author_line_regex = \
re.compile(r'^(?P<datetime>\d{4}-\d{2}-\d{2})\ {2}(?P<name>.* <.*>)')
additional_author_regex = re.compile(r'^\t(?P<spaces>\ *)?(?P<name>.* <.*>)')
-changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)/ChangeLog:?')
+changelog_regex = re.compile(r'^(?:[fF]or +)?([a-z0-9+-/]*)ChangeLog:?')
pr_regex = re.compile(r'\tPR (?P<component>[a-z+-]+\/)?([0-9]+)$')
dr_regex = re.compile(r'\tDR ([0-9]+)$')
star_prefix_regex = re.compile(r'\t\*(?P<spaces>\ *)(?P<content>.*)')
@@ -359,7 +359,8 @@ class GitCommit:
% LINE_LIMIT, line))
m = changelog_regex.match(line)
if m:
- last_entry = ChangeLogEntry(m.group(1), self.top_level_authors,
+ last_entry = ChangeLogEntry(m.group(1).rstrip('/'),
+ self.top_level_authors,
self.top_level_prs)
self.changelog_entries.append(last_entry)
elif self.find_changelog_location(line):