Mercurial > hg-stable
changeset 13123:2506658c3927 stable
churn: ignore trailing and leading spaces (issue2546)
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 13 Dec 2010 16:41:39 +0900 |
parents | 2245fcd0e160 |
children | cc5f0c0c19bc |
files | hgext/churn.py tests/test-churn.t |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/churn.py Fri Dec 10 01:30:16 2010 +0100 +++ b/hgext/churn.py Mon Dec 13 16:41:39 2010 +0900 @@ -62,6 +62,7 @@ key = getkey(ctx) key = amap.get(key, key) # alias remap + key = key.strip() # ignore leading and trailing spaces if opts.get('changesets'): rate[key] = (rate.get(key, (0,))[0] + 1, 0) else:
--- a/tests/test-churn.t Fri Dec 10 01:30:16 2010 +0100 +++ b/tests/test-churn.t Mon Dec 13 16:41:39 2010 +0900 @@ -139,3 +139,22 @@ $ hg churn test 0 $ cd .. + +Ignore trailing or leading spaces in emails + + $ cd repo + $ touch bar + $ hg ci -Am'bar' -u 'user4 <user4@x.com>' + adding bar + $ touch foo + $ hg ci -Am'foo' -u 'user4 < user4@x.com >' + adding foo + $ hg log -l2 --template '[{author|email}]\n' + [ user4@x.com ] + [user4@x.com] + $ hg churn -c + user1 4 ********************************************************* + user3 3 ******************************************* + user4@x.com 2 ***************************** + user2 2 ***************************** + with space 1 **************