From fd7df12e3dba97760c1eb2a3d8bd782bbf633a24 Mon Sep 17 00:00:00 2001 From: Bhuvan Arumugam Date: Sun, 6 May 2012 15:35:58 -0700 Subject: Truly handle mailmap entries for all combinations. Bug: 994957 Mailmap might contain mapping with full name. This commit fixes it to handle these combinations: Foo ZZ Bar YY Foo Bar This is inline with mailmap convention described here: http://man.github.com/git/git-shortlog.html * keystone/openstack/common/setup.py parse_mailmap(): Pull out canonical and alias email addresses. * keystone/tests/test_setup.py New test script to cover various combinations in mailmap. Change-Id: I471172aa012f37e499e86ffeb74c30ebcdb89b00 --- keystone/openstack/common/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keystone/openstack') diff --git a/keystone/openstack/common/setup.py b/keystone/openstack/common/setup.py index 60c731a9..2c16b5b3 100644 --- a/keystone/openstack/common/setup.py +++ b/keystone/openstack/common/setup.py @@ -31,7 +31,8 @@ def parse_mailmap(mailmap='.mailmap'): for l in fp: l = l.strip() if not l.startswith('#') and ' ' in l: - canonical_email, alias = l.split(' ') + canonical_email, alias = [x for x in l.split(' ') \ + if x.startswith('<')] mapping[alias] = canonical_email return mapping -- cgit