gcc-changelog: Add note about ChangeLog entries
authorMartin Liska <mliska@suse.cz>
Mon, 24 May 2021 07:16:01 +0000 (09:16 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 24 May 2021 07:18:44 +0000 (09:18 +0200)
contrib/ChangeLog:

* gcc-changelog/git_commit.py: Add note that ChangeLog entries
are added automatically.
* gcc-changelog/test_email.py: Update test.

contrib/gcc-changelog/git_commit.py
contrib/gcc-changelog/test_email.py

index 4958ab9..bd8c1ff 100755 (executable)
@@ -326,9 +326,11 @@ class GitCommit:
             # All modified files are only MISC files
             return
         elif project_files:
-            self.errors.append(Error('ChangeLog, DATESTAMP, BASE-VER and '
-                                     'DEV-PHASE updates should be done '
-                                     'separately from normal commits'))
+            err = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates ' \
+                  'should be done separately from normal commits\n' \
+                  '(note: ChangeLog entries will be automatically ' \
+                  'added by a cron job)'
+            self.errors.append(Error(err))
             return
 
         all_are_ignored = (len(project_files) + len(ignored_files)
index 7472762..6d65963 100755 (executable)
@@ -258,7 +258,7 @@ class TestGccChangelog(unittest.TestCase):
         email = self.from_patch_glob('0001-Add-patch_are')
         msg = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates should ' \
               '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):
         email = self.get_git_email('0001-Just-test-it.patch')