Commit Graph

96 Commits

Author SHA1 Message Date
Richard Biener
c62643579d Close gcc-9 branch
This removes gcc-9 from getting DATESTAMP updates.

gcc/contrib/
	* gcc-changelog/git_update_version.py (active_refs): Remove
	releases/gcc-9.
2022-05-27 09:05:39 +02:00
Jakub Jelinek
12cc2b3299 Update crontab and git_update_version.py
2022-04-28  Jakub Jelinek  <jakub@redhat.com>

maintainer-scripts/
	* crontab: Snapshots from trunk are now GCC 13 related.
	Add GCC 12 snapshots from the respective branch.
contrib/
	* gcc-changelog/git_update_version.py (active_refs): Add
	releases/gcc-12.
2022-04-28 16:22:42 +02:00
Martin Liska
865e36a08b gcc-changelog: ignore one more revision
Ignore:

Checking 86d8e0c065: FAILED
ERR: line should start with a tab: "This reverts commits r12-7804 and r12-7929."
ERR: could not deduce ChangeLog file

contrib/ChangeLog:

	* gcc-changelog/git_update_version.py: Ignore the revision.
2022-04-04 09:37:15 +02:00
Martin Liska
a74ccc8cb0 gcc-changelog: Update revert_regex.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Match trailing dot literally.
2022-03-28 12:42:46 +02:00
Martin Liska
c8464cf444 gcc-changelog: Make This reverts stricter.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Make the parsing stricter.
2022-03-28 12:29:29 +02:00
Jakub Jelinek
0268c547de Add another commit to ignore
We can't handle r12-7818-g3ab5c8cd03d92bf4ec41e351820349d92fbc40c4

	* gcc-changelog/git_update_version.py: Add
	3ab5c8cd03 to ignored commits.
2022-03-26 11:20:58 +01:00
Martin Liska
978abe918f gcc-changelog: Be stricter for top-level dir.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: New files in toplev must
	be explicitly marked as "New file".
	* gcc-changelog/test_email.py: Test.
	* gcc-changelog/test_patches.txt: Add test.
2022-01-24 13:26:30 +01:00
Martin Liska
af1bfcc04c Add -v option for git_check_commit.py.
Doing so, one can see:
$ git gcc-verify a50914d2111c72d2cd5cb8cf474133f4f85a25f6 -v
Checking a50914d2111c72d2cd5cb8cf474133f4f85a25f6: FAILED
ERR: unchanged file mentioned in a ChangeLog: "gcc/common.opt"
ERR: unchanged file mentioned in a ChangeLog (did you mean "gcc/testsuite/g++.dg/pr102955.C"?): "gcc/testsuite/gcc.dg/pr102955.c"
- gcc/testsuite/gcc.dg/pr102955.c
?                ^^             ^

+ gcc/testsuite/g++.dg/pr102955.C
?                ^^             ^

contrib/ChangeLog:

	* gcc-changelog/git_check_commit.py: Add -v option.
	* gcc-changelog/git_commit.py: Print verbose diff for wrong
	filename.
2021-11-04 15:01:52 +01:00
H.J. Lu
25ab851dd3 gcc-changelog: Add libffi/ to ignored_prefixes
Add libffi/ to ignored_prefixes for syncing with libffi upstream:

commit c095f8f2e6f26bfc2ff8e3276c6af23ab153f5ff
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Aug 31 07:14:47 2021 -0700

    libffi: Sync with libffi 3.4.2

    Merged commit: f9ea41683444ebe11cfa45b05223899764df28fb

to avoid

remote: *** The following commit was rejected by your hooks.commit-extra-checker script (status: 1)
remote: *** commit: c095f8f2e6f26bfc2ff8e3276c6af23ab153f5ff
remote: *** ChangeLog format failed:
remote: *** ERR: cannot find a ChangeLog location in message
remote: ***
remote: *** Please see: https://gcc.gnu.org/codingconventions.html#ChangeLogs
remote: ***
remote: error: hook declined to update refs/heads/master

	* gcc-changelog/git_commit.py (ignored_prefixes): Add libffi/.
2021-10-20 05:25:56 -07:00
Martin Liska
85ce673378 gcc-changelog: update error message location
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Update location of
	'bad parentheses wrapping'.
	* gcc-changelog/test_email.py: Test it.
2021-10-18 11:07:14 +02:00
Martin Liska
a37d7d6fc1 gcc-changelog: Add FIXME note.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Add FIXME note.
2021-09-15 16:38:41 +02:00
Martin Liska
e0fcdc46a2 gcc-changelog: check git commit email address
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Check commit email.
	* gcc-changelog/test_email.py: Add new test.
	* gcc-changelog/test_patches.txt: Likewise.
2021-09-15 16:32:50 +02:00
Martin Liska
e460471571 gcc-changelog: ignore one more commit
contrib/ChangeLog:

	* gcc-changelog/git_update_version.py: Ignore problematic
	  commit.
2021-08-03 09:22:30 +02:00
Tobias Burnus
d554f43c98 contrib/gcc-changelog: Check that PR in subject is in changelog
This patch checks that a '[PRnnnn]' and '(PRnnnn)' also appears as PR in the
changelog part of the commit message.  And it does likewise for 'PR comp/nnnn'
except that then also the component name is checked.  (Note that the reverse
is permitted, i.e. PR(s) only appearing in the changelog.)
To avoid false positives, PR numbers in the subject line are ignored,
if 'revert' appears.
Additionally, reject commits with a nonempty second line.

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (pr_regex): Add ?P<pr> for group('pr').
	(subject_pr_regex, subject_pr2_regex): New.
	(GitInfo.__init__, GitCommit.parse_changelog): Check subject PRs.
	* gcc-changelog/git_email.py (SUBJECT_PREFIX, subject_patch_regex): New.
	(GitEmail.__init__): Parse 'Subject:' and pass it to GitInfo.
	* gcc-changelog/test_email.py (test_pr_only_in_subject,
	test_wrong_pr_comp_in_subject, test_copyright_years): New.
	* gcc-changelog/test_patches.txt (0030-PR-c-92746, pr-check1.patch):
	Update to avoid triggering the new check.
	(0001-rs6000-Support-doubleword, pr-wrong-comp.patch,
	copyright-years.patch): New.
2021-06-13 07:46:54 +02:00
Martin Liska
e01874cdae gcc-changelog: Ignore one more commit.
contrib/ChangeLog:

	* gcc-changelog/git_update_version.py: Ignore commit that
	violates rules and was somehow pushed.
2021-06-11 10:13:54 +02:00
Martin Liska
9d38e096c5 gcc-changelog: Add note about ChangeLog entries
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Add note that ChangeLog entries
	are added automatically.
	* gcc-changelog/test_email.py: Update test.
2021-05-24 09:18:44 +02:00
Jonathan Wakely
7b4bae0acb gcc-changelog: Remove use of non-strict mode
contrib/ChangeLog:

	* gcc-changelog/git_email.py: Remove use of non-strict mode.
2021-05-18 10:09:34 +01:00
Jakub Jelinek
df18a1343d Closing of 8 branch.
2021-05-14  Jakub Jelinek  <jakub@redhat.com>

contrib/
	* gcc-changelog/git_update_version.py: Remove releases/gcc-8 from
	active_refs.
maintainer-scripts/
	* crontab: Stop doing gcc-8 snapshots.
2021-05-14 11:25:30 +02:00
Martin Liska
ae3e0b8bc2 gcc-changelog: detect Co-Authored-By before ChangeLog entries
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Support Co-Authored-By before
	a first ChangeLog entry.
2021-05-14 10:44:33 +02:00
Martin Liska
5caadfbde2 gcc-changelog: respect branch in git_update_version.py.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Simplify needle lookup.
	* gcc-changelog/git_update_version.py: Pass ref_name to
	parse_git_revisions.
2021-05-12 10:37:12 +02:00
Martin Liska
8f67bf25a4 gcc-changelog: Remove non-strict mode.
contrib/ChangeLog:

	* gcc-changelog/git_check_commit.py: Remove --non-strict-mode.
	* gcc-changelog/git_commit.py: Remove strict mode.
	* gcc-changelog/git_email.py: Likewise.
	* gcc-changelog/git_repository.py: Likewise.
	* gcc-changelog/test_email.py: Likewise.
	* gcc-changelog/test_patches.txt: Update patches so that they
	don't contain a ChangeLog file changes.
2021-05-11 10:55:07 +02:00
Martin Liska
772e5e82e3 gcc-changelog: Accept ref_name argument in GitCommit.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Remove ChangeLog locations
	based on ref_name.
	* gcc-changelog/git_repository.py: Likewise.
2021-05-11 10:53:26 +02:00
Martin Liska
0fd1a54ba3 gcc-changelog: remove newlines in git_email.py --help
contrib/ChangeLog:

	* gcc-changelog/git_email.py: Remove newlines when --help
	is used.
2021-05-10 15:17:06 +02:00
Tobias Burnus
8300c34660 contrib/gcc-changelog: Add/improve --help
contrib/ChangeLog:

	* gcc-changelog/git_check_commit.py (__Main__): State in --help
	the default value for 'revisions'.
	* gcc-changelog/git_email.py (show_help): Add.
	(__main__): Handle -h and --help.
2021-05-10 15:14:11 +02:00
Tobias Burnus
c1d381f007 contrib/gcc-changelog: Detect if same file appears twice
contrib/ChangeLog:

	* gcc-changelog/git_commit.py (Error.__repr__): Add space after the colon.
	(GitCommit.check_mentioned_files): Check whether the same file has been
	specified multiple times.
	* gcc-changelog/test_email.py (TestGccChangelog.test_multi_same_file): New.
	* gcc-changelog/test_patches.txt (0001-OpenMP-Fix-SIMT): New test.
2021-05-10 14:37:15 +02:00
Martin Liska
3e5605f0a9 Revert "gcc-changelog: Remove components that will be removed."
This reverts commit fea26bad2e.
2021-05-10 13:44:28 +02:00
Martin Liska
fea26bad2e gcc-changelog: Remove components that will be removed.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Remove components that will be
	removed.
2021-05-10 09:22:26 +02:00
Jakub Jelinek
919323c1a4 Update crontab and git_update_version.py
2021-04-20  Jakub Jelinek  <jakub@redhat.com>

maintainer-scripts/
	* crontab: Snapshots from trunk are now GCC 12 related.
	Add GCC 11 snapshots from the respective branch.
contrib/
	* gcc-changelog/git_update_version.py (active_refs): Add
	releases/gcc-11.
2021-04-20 10:50:22 +02:00
Martin Liska
1c35444b91 gcc-changelog: do not allow space in long line
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Do not allow space in long lines.
2021-04-12 14:11:27 +02:00
Martin Liska
a694a02125 mklog: support long filenames
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Support long filenames
	in entries.
	* gcc-changelog/test_email.py: Test it.
	* gcc-changelog/test_patches.txt: Likewise.
2021-04-12 13:16:50 +02:00
Martin Liska
5f6a43d691 gcc-changelog: skip broken commit in git_update_version.py.
contrib/ChangeLog:

	* gcc-changelog/git_update_version.py: Skip one problematic
	commit.
2021-03-16 11:50:50 +01:00
Martin Liska
a7ac3e92ec gcc-changelog: allow ChangeLog deletion in a commit
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Allow deletion of ChangeLog
	files.
	* gcc-changelog/setup.cfg: Set line limit to 120 characters.
	* gcc-changelog/test_email.py: Add test.
	* gcc-changelog/test_patches.txt: Likewise.
	* gcc-changelog/git_email.py: Fix parsing of deleted files.
2021-03-12 09:29:05 +01:00
Martin Liska
7d7ef413ef gcc-changelog: Support multiline parentheses wrapping
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Support wrapping of functions
	in parentheses that can take multiple lines.
	* gcc-changelog/test_email.py: Add tests for it.
	* gcc-changelog/test_patches.txt: Add 2 patches.
2021-01-13 17:22:34 +01:00
Martin Liska
c23aea6edc gcc-changelog: Allow modifications to old ChangeLogs without entry
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Allow modifications of older
	ChangeLog (or specific) files without need to make a ChangeLog
	entry.
	* gcc-changelog/test_email.py: Test it.
	* gcc-changelog/test_patches.txt: Add new patch.
2021-01-13 11:57:14 +01:00
Martin Liska
57706dd7e0 gcc-changelog: workaround for utf8 filenames
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Add decode_path function.
	* gcc-changelog/git_email.py: Use it in order to solve
	utf8 encoding filename issues.
	* gcc-changelog/git_repository.py: Likewise.
	* gcc-changelog/test_email.py: Test it.
2021-01-06 08:26:10 +01:00
Martin Liska
8869bd0efc gcc-changelog: Ignore copyright years commits.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Skip Update copyright
	years commits.
2021-01-04 10:09:07 +01:00
Martin Liska
1b021bbd85 gcc-changelog: new error for quoted utf8 filenames
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Add new error for quoted
	filenames.
	* gcc-changelog/test_email.py: Test it.
	* gcc-changelog/test_patches.txt: Test it.
2020-12-21 10:35:11 +01:00
Martin Liska
2ebe752658 gcc-changelog: add Unicode test-case
contrib/ChangeLog:

	* gcc-changelog/test_email.py: New test.
	* gcc-changelog/test_patches.txt: Likewise.
2020-12-21 10:21:25 +01:00
Nathan Sidwell
c5271279d6 Add toplevel dirs
contrib/
	* gcc-changelog/git_commit.py (changelog_locations): Add
	libcody, c++tools.
2020-12-15 09:51:50 -05:00
Martin Liska
57cbb7acdb changelog: add hint for a file mismatch
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Suggest close file for
	'unchanged file mentioned in a ChangeLog' error.
	* gcc-changelog/test_email.py: Test it.
2020-11-30 17:19:41 +01:00
Martin Liska
1e5c644fb6 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.
2020-11-30 13:42:25 +01:00
Jonathan Wakely
08cd56a6b3 gcc-changelog: Add libstdc++-v3/testsuite to wildcard prefixes
This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which
was one of the original motivations for adding wildcard support in the
first place:
https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++
	testsuite directory.
2020-11-30 11:41:03 +00:00
Martin Liska
fbbce1c6e9 changelog: Allow wildcard pattern only.
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Allow wildcard pattern only.
2020-11-30 10:40:36 +01:00
Martin Liska
b8ae0812ee changelog: allow flexible "cherry picked" format.
It handles the following:
(cherry picked from commit c0c7270cc4 (testsuite changes only))

contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Use regex for cherry pick prefix.
	* gcc-changelog/test_email.py: Test it.
	* gcc-changelog/test_patches.txt: Likewise.
2020-11-27 13:43:25 +01:00
Martin Liska
d3e763efcb changelog: fix parsing of a revert commit
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Use revert_regex instead
	of string prefix.  Convert sets to literals.
2020-11-25 07:56:57 +01:00
Martin Liska
f176773bc2 gcc-changelog: prevent double cherry-pick line
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Add new check.
	* gcc-changelog/test_email.py: Test it.
	* gcc-changelog/test_patches.txt: Add new patch.
2020-11-06 13:33:41 +01:00
Martin Liska
10a50d261e gcc-changelog: Change parse_git_revisions strict argument to True.
Change the default that is used by GIT server hook and also
by git_update_version.py. Both should use True now.

contrib/ChangeLog:

	* gcc-changelog/git_repository.py: Set strict=True
	for parse_git_revisions as a default.
2020-11-04 11:01:58 +01:00
Tobias Burnus
619039de36 gcc-changelog/git_commit.py: Check for missing description
Especially when using mklog.py, it is simply to forget to fill in
the entries after the '\t* file.c (section):' or '\t(section):'.

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (item_parenthesis_empty_regex,
	item_parenthesis_regex): Add.
	(check_for_empty_description): Use them.
	* gcc-changelog/test_email.py (test_emptry_entry_desc,
	test_emptry_entry_desc_2): Add.
	* gcc-changelog/test_patches.txt: Add two testcases for it.
2020-11-04 10:35:54 +01:00
Tobias Burnus
84ed8d2c88 gcc-changelog/git_email.py: Support older unidiff modules
contrib/ChangeLog:

	* gcc-changelog/git_email.py: Add unidiff_supports_renaming check.
2020-11-03 17:46:36 +01:00
Martin Liska
19859d6ba6 Add setup.cfg for pytest.
contrib/ChangeLog:

	* gcc-changelog/setup.cfg: New file.
2020-11-03 17:32:10 +01:00