From affabf5be4db8b15974bb9ce4c16b0a8242e1fc2 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 23 Sep 2011 15:57:55 +0100 Subject: Don't use GitPython for authors check I hit this issue with an older GitPython version: https://bugzilla.redhat.com/740852 Seeing as all GitPython is doing for us is running: $> git rev-list --pretty=raw HEAD and parsing the output, I figure it's just as easy for us to run git directly. Change-Id: Ib43e2346c7d4c47e7776919f2b9c982133628129 --- nova/tests/test_misc.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'nova') diff --git a/nova/tests/test_misc.py b/nova/tests/test_misc.py index c5875a843..45c496568 100644 --- a/nova/tests/test_misc.py +++ b/nova/tests/test_misc.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. +import commands import errno import os import select @@ -67,19 +68,13 @@ class ProjectTestCase(test.TestCase): tree.unlock() elif os.path.exists(os.path.join(topdir, '.git')): - import git - repo = git.Repo(topdir) - for commit in repo.head.commit.iter_parents(): - email = commit.author.email - if email is None: - email = commit.author.name - if 'nova-core' in email: + for email in commands.getoutput('git log --format=%ae').split(): + if not email: + continue + if "jenkins@review.openstack.org" in email: continue - if email.split(' ')[-1] == '<>': - email = email.split(' ')[-2] email = '<' + email + '>' contributors.add(str_dict_replace(email, mailmap)) - else: return -- cgit