diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2011-09-23 15:57:55 +0100 |
|---|---|---|
| committer | Monty Taylor <mordred@inaugust.com> | 2011-09-23 13:18:06 -0400 |
| commit | affabf5be4db8b15974bb9ce4c16b0a8242e1fc2 (patch) | |
| tree | 32fc83699f94cd5ddbef2f0d3658afe9175936b5 /nova | |
| parent | 37100f5653960b7f898e91663839feed51e14419 (diff) | |
| download | nova-affabf5be4db8b15974bb9ce4c16b0a8242e1fc2.tar.gz nova-affabf5be4db8b15974bb9ce4c16b0a8242e1fc2.tar.xz nova-affabf5be4db8b15974bb9ce4c16b0a8242e1fc2.zip | |
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
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/tests/test_misc.py | 15 |
1 files changed, 5 insertions, 10 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 |
