##// END OF EJS Templates
churn: ignore trailing and leading spaces (issue2546)
Nicolas Dumazet -
r13123:2506658c stable
parent child Browse files
Show More
@@ -62,6 +62,7 b' def countrate(ui, repo, amap, *pats, **o'
62
62
63 key = getkey(ctx)
63 key = getkey(ctx)
64 key = amap.get(key, key) # alias remap
64 key = amap.get(key, key) # alias remap
65 key = key.strip() # ignore leading and trailing spaces
65 if opts.get('changesets'):
66 if opts.get('changesets'):
66 rate[key] = (rate.get(key, (0,))[0] + 1, 0)
67 rate[key] = (rate.get(key, (0,))[0] + 1, 0)
67 else:
68 else:
@@ -139,3 +139,22 b' this was failing with a ZeroDivisionErro'
139 $ hg churn
139 $ hg churn
140 test 0
140 test 0
141 $ cd ..
141 $ cd ..
142
143 Ignore trailing or leading spaces in emails
144
145 $ cd repo
146 $ touch bar
147 $ hg ci -Am'bar' -u 'user4 <user4@x.com>'
148 adding bar
149 $ touch foo
150 $ hg ci -Am'foo' -u 'user4 < user4@x.com >'
151 adding foo
152 $ hg log -l2 --template '[{author|email}]\n'
153 [ user4@x.com ]
154 [user4@x.com]
155 $ hg churn -c
156 user1 4 *********************************************************
157 user3 3 *******************************************
158 user4@x.com 2 *****************************
159 user2 2 *****************************
160 with space 1 **************
General Comments 0
You need to be logged in to leave comments. Login now