diff options
author | Martin Liska <mliska@suse.cz> | 2020-05-21 10:23:50 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-05-21 10:23:50 +0200 |
commit | 9722b1399a555e697538aa9b0daec77127596dea (patch) | |
tree | c99c777e55c3885712855cbff6bb2d742c0edd4b /contrib/gcc-changelog/git_commit.py | |
parent | e7c7cdc5f427281c675b7a42a1554dfdaa03e185 (diff) | |
download | gcc-9722b1399a555e697538aa9b0daec77127596dea.zip gcc-9722b1399a555e697538aa9b0daec77127596dea.tar.gz gcc-9722b1399a555e697538aa9b0daec77127596dea.tar.bz2 |
Support DR entries for gcc-changelog.
* gcc-changelog/git_commit.py: Support DR entries/
* gcc-changelog/test_email.py: New test for it.
* gcc-changelog/test_patches.txt: New patch for it.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-x | contrib/gcc-changelog/git_commit.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 8c347d1..e22d3a2 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -145,6 +145,7 @@ author_line_regex = \ additional_author_regex = re.compile(r'^\t(?P<spaces>\ *)?(?P<name>.* <.*>)') changelog_regex = re.compile(r'^([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>.*)') LINE_LIMIT = 100 @@ -297,7 +298,7 @@ class GitCommit: continue if (changelog_regex.match(b) or self.find_changelog_location(b) or star_prefix_regex.match(b) or pr_regex.match(b) - or author_line_regex.match(b)): + or dr_regex.match(b) or author_line_regex.match(b)): self.changes = body[i:] return self.errors.append(Error('cannot find a ChangeLog location in ' @@ -350,6 +351,8 @@ class GitCommit: continue else: pr_line = line.lstrip() + elif dr_regex.match(line): + pr_line = line.lstrip() lowered_line = line.lower() if lowered_line.startswith(CO_AUTHORED_BY_PREFIX): |