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.
This commit is contained in:
Martin Liska 2021-05-24 09:16:01 +02:00
parent dc084c487e
commit 9d38e096c5
2 changed files with 6 additions and 4 deletions

View File

@ -326,9 +326,11 @@ class GitCommit:
# All modified files are only MISC files # All modified files are only MISC files
return return
elif project_files: elif project_files:
self.errors.append(Error('ChangeLog, DATESTAMP, BASE-VER and ' err = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates ' \
'DEV-PHASE updates should be done ' 'should be done separately from normal commits\n' \
'separately from normal commits')) '(note: ChangeLog entries will be automatically ' \
'added by a cron job)'
self.errors.append(Error(err))
return return
all_are_ignored = (len(project_files) + len(ignored_files) all_are_ignored = (len(project_files) + len(ignored_files)

View File

@ -258,7 +258,7 @@ class TestGccChangelog(unittest.TestCase):
email = self.from_patch_glob('0001-Add-patch_are') email = self.from_patch_glob('0001-Add-patch_are')
msg = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates should ' \ msg = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates should ' \
'be done separately from normal commits' 'be done separately from normal commits'
assert email.errors[0].message == msg assert email.errors[0].message.startswith(msg)
def test_strict_mode_normal_patch(self): def test_strict_mode_normal_patch(self):
email = self.get_git_email('0001-Just-test-it.patch') email = self.get_git_email('0001-Just-test-it.patch')