diff options
author | Bhuvan Arumugam <bhuvan@apache.org> | 2012-05-06 15:35:58 -0700 |
---|---|---|
committer | Bhuvan Arumugam <bhuvan@apache.org> | 2012-05-06 15:39:33 -0700 |
commit | fd7df12e3dba97760c1eb2a3d8bd782bbf633a24 (patch) | |
tree | 2f74fe99187efec67f715ea9a0df8484f360a033 /keystone/openstack | |
parent | a1c2dd19633dfe7d792bfec524104bcf683a5d77 (diff) | |
download | keystone-fd7df12e3dba97760c1eb2a3d8bd782bbf633a24.tar.gz keystone-fd7df12e3dba97760c1eb2a3d8bd782bbf633a24.tar.xz keystone-fd7df12e3dba97760c1eb2a3d8bd782bbf633a24.zip |
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 <email@foo.com> Bar YY <email@bar.com>
Foo <email@foo.com> Bar <email@bar.com>
<email@foo.com> <email@bar.com>
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
Diffstat (limited to 'keystone/openstack')
-rw-r--r-- | keystone/openstack/common/setup.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |