diff options
author | Mark Probst <mark.probst@gmail.com> | 2010-07-30 05:51:46 +0400 |
---|---|---|
committer | Mark Probst <mark.probst@gmail.com> | 2010-07-30 22:58:57 +0400 |
commit | f6a12f0096b2815c003ddf67fb8c307c63badd55 (patch) | |
tree | 252f7e8fdd915ff5e2907b13fc02b863cf5bf0be /scripts | |
parent | ab9b34d79f7a93ecd95d1c0220452fb1e9d0e0bb (diff) |
Don't generate empty ChangeLog entries, insert the whole message instead.
The commits-to-changelog script previously generated ChangeLog entries
with a FIXME if it couldn't find anything applicable for that
particular ChangeLog. Since we want to use the script for "make dist"
it shouldn't do this. Instead it now just inserts the whole commit
message in those ChangeLogs.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/commits-to-changelog.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py index 38de6db57a4..fa2079fbfdd 100755 --- a/scripts/commits-to-changelog.py +++ b/scripts/commits-to-changelog.py @@ -71,7 +71,7 @@ def append_paragraph (lines, paragraph): lines.append ("") lines += paragraph -def format_changelog_entries (commit, changed_files, prefix, file_entries): +def format_changelog_entries (commit, changed_files, prefix, file_entries, all_paragraphs): changelogs = set () for f in changed_files: changelogs.add (changelog_for_file (f)) @@ -104,8 +104,10 @@ def format_changelog_entries (commit, changed_files, prefix, file_entries): for changelog in unmarked_changelogs: if len (prefix) == 0: print "Warning: empty entry in %s for commit %s" % (changelog_path (changelog), commit) - append_paragraph (paragraphs [changelog], format_paragraph ("FIXME: empty entry!")) - for paragraph in prefix: + insert_paragraphs = all_paragraphs + else: + insert_paragraphs = prefix + for paragraph in insert_paragraphs: append_paragraph (paragraphs [changelog], format_paragraph (paragraph)) return paragraphs @@ -175,7 +177,8 @@ def process_commit (commit): current_files = None current_files_comments = None - for line in message.splitlines (): + message_lines = message.splitlines () + for line in message_lines: if re.match ("\*\s[^:]+:", line): if current_files: file_entries.append ((current_files, current_files_comments)) @@ -202,7 +205,7 @@ def process_commit (commit): if current_files: file_entries.append ((current_files, current_files_comments)) - changelog_entries = format_changelog_entries (commit, changed_files, prefix, file_entries) + changelog_entries = format_changelog_entries (commit, changed_files, prefix, file_entries, message_lines) #debug_print_commit (commit, raw_message, prefix, file_entries, changed_files, changelog_entries) |