From c88db2c8f73e13e1cfba081d91743a7450c5732d Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Mon, 25 Mar 2013 16:09:46 +0100 Subject: [PATCH] Include Co-authored-by entries in AUTHORS Import latest openstack.common.setup from oslo-incubator, which includes the fix to include Co-authored-by entries in AUTHORS. Fixes bug 1158319 Change-Id: I4f0ba09816730d10869c4ca639e2930d266eac8f --- nova/openstack/common/setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nova/openstack/common/setup.py b/nova/openstack/common/setup.py index 030df61c994..dec74fd0d6b 100644 --- a/nova/openstack/common/setup.py +++ b/nova/openstack/common/setup.py @@ -171,6 +171,14 @@ def generate_authors(): " log --format='%aN <%aE>' | sort -u | " "egrep -v '" + jenkins_email + "'") changelog = _run_shell_command(git_log_cmd) + signed_cmd = ("git log --git-dir=" + git_dir + + " | grep -i Co-authored-by: | sort -u") + signed_entries = _run_shell_command(signed_cmd) + if signed_entries: + new_entries = "\n".join( + [signed.split(":", 1)[1].strip() + for signed in signed_entries.split("\n") if signed]) + changelog = "\n".join((changelog, new_entries)) mailmap = _parse_git_mailmap(git_dir) with open(new_authors, 'w') as new_authors_fh: new_authors_fh.write(canonicalize_emails(changelog, mailmap))