All pastes #2018035 Raw Edit

nicdumz

public text v1 · immutable
#2018035 ·published 2010-12-13 07:49 UTC
rendered paste body
# HG changeset patch# User Nicolas Dumazet <nicdumz.commits@gmail.com># Date 1292226099 -32400# Branch stable# Node ID 2506658c392736bca3219a69f169ef89ce4e4249# Parent  2245fcd0e160b030ad05b1db55b56cfcec87a826churn: ignore trailing and leading spaces (issue2546)diff --git a/hgext/churn.py b/hgext/churn.py--- a/hgext/churn.py+++ b/hgext/churn.py@@ -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:diff --git a/tests/test-churn.t b/tests/test-churn.t--- a/tests/test-churn.t+++ b/tests/test-churn.t@@ -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 **************