From 1e5c644fb62e3e1757cf74fe8a14873d5e8ba53e Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 30 Nov 2020 13:41:26 +0100 Subject: changelog: allow subdir wildcard entry contrib/ChangeLog: * gcc-changelog/git_commit.py: Allow sub-directory wildcard changelog entry. Fix a typo caused by apostrophe escaping. * gcc-changelog/test_email.py: Test it. * gcc-changelog/test_patches.txt: Likewise. --- contrib/gcc-changelog/git_commit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/gcc-changelog/git_commit.py') diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 6487de3..57fba75 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -493,7 +493,7 @@ class GitCommit: for entry in self.changelog_entries: for pattern in entry.file_patterns: name = os.path.join(entry.folder, pattern) - if name not in wildcard_prefixes: + if not [name.startswith(pr) for pr in wildcard_prefixes]: msg = 'unsupported wildcard prefix' self.errors.append(Error(msg, name)) @@ -617,7 +617,7 @@ class GitCommit: for pattern in mentioned_patterns: if pattern not in used_patterns: - error = 'pattern doesn''t match any changed files' + error = "pattern doesn't match any changed files" self.errors.append(Error(error, pattern)) def check_for_correct_changelog(self): -- cgit v1.1