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 +++++---------- tools/pip-requires | 2 -- 2 files changed, 5 insertions(+), 12 deletions(-) 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 diff --git a/tools/pip-requires b/tools/pip-requires index f47d6130c..b5d1fa713 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -21,7 +21,6 @@ wsgiref==0.1.2 mox==0.5.3 greenlet==0.3.1 nose -bzr PasteDeploy paste sqlalchemy-migrate @@ -33,6 +32,5 @@ nova-adminclient suds==0.4 coverage nosexcover -GitPython paramiko feedparser -- cgit