diff options
author | Mark Probst <mark.probst@gmail.com> | 2010-08-02 16:36:56 +0400 |
---|---|---|
committer | Mark Probst <mark.probst@gmail.com> | 2010-08-02 16:36:56 +0400 |
commit | d224cf2f345a42576b651d64f1c7a872f8ef18f4 (patch) | |
tree | 0813318ab1f2df86c3baa5c8ffa56020d7c493ab /scripts | |
parent | 89f62d1b87e62f7353c21392bea580f01ccd3d2c (diff) |
[commit-to-changelog] Bugfix.
The commit-to-changelog script would crash for commits that already
contain ChangeLog entries.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/commits-to-changelog.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py index fa2079fbfdd..ba68a6f67e8 100755 --- a/scripts/commits-to-changelog.py +++ b/scripts/commits-to-changelog.py @@ -144,7 +144,7 @@ def debug_print_commit (commit, raw_message, prefix, file_entries, changed_files def process_commit (commit): changed_files = map (lambda l: l.split () [2], git ("diff-tree", "--numstat", commit).splitlines () [1:]) if len (filter (lambda f: re.search ("(^|/)Change[Ll]og$", f), changed_files)): - return + return None raw_message = git ("log", "-n1", "--format=%B", commit) # filter SVN migration message message = re.sub ("(^|\n)svn path=[^\n]+revision=\d+(?=$|\n)", "", raw_message) @@ -251,6 +251,8 @@ def main (): touched_changelogs = {} for commit in commits: entries = process_commit (commit) + if entries == None: + continue for (changelog, lines) in entries.items (): if changelog not in touched_changelogs: touched_changelogs [changelog] = start_changelog (changelog) |