2020-05-19 Martin Liska <mliska@suse.cz>
+ * gcc-changelog/git_commit.py: Add param use_commit_ts
+ for to_changelog_entries.
+ * gcc-changelog/git_update_version.py: Se use_commit_ts to True.
+
+2020-05-19 Martin Liska <mliska@suse.cz>
+
* mklog.py: Skip GTY for struct names. Make flake8 happy.
* test_mklog.py: Add test for GTY.
err = Error(msg % (entry.folder, changelog_location), file)
self.errors.append(err)
- def to_changelog_entries(self):
+ def to_changelog_entries(self, use_commit_ts=False):
for entry in self.changelog_entries:
output = ''
timestamp = entry.datetime
- if not timestamp:
+ if not timestamp or use_commit_ts:
timestamp = self.date.strftime('%Y-%m-%d')
authors = entry.authors if entry.authors else [self.author]
# add Co-Authored-By authors to all ChangeLog entries
print(error)
# TODO: add error message
return
- for entry, output in git_commit.to_changelog_entries():
+ for entry, output in git_commit.to_changelog_entries(use_commit_ts=True):
# TODO
full_path = os.path.join(folder, entry, 'ChangeLog.test')
print('writting to %s' % full_path)