##// END OF EJS Templates
churn: sort users with same churn by name...
Mads Kiilerich -
r18369:2150e70c default
parent child Browse files
Show More
@@ -144,8 +144,10 b' def churn(ui, repo, *pats, **opts):'
144 144 if not rate:
145 145 return
146 146
147 sortkey = ((not opts.get('sort')) and (lambda x: -sum(x[1])) or None)
148 rate.sort(key=sortkey)
147 if opts.get('sort'):
148 rate.sort()
149 else:
150 rate.sort(key=lambda x: (-sum(x[1]), x))
149 151
150 152 # Be careful not to have a zero maxcount (issue833)
151 153 maxcount = float(max(sum(v) for k, v in rate)) or 1.0
@@ -37,16 +37,16 b' churn separate directories'
37 37 churn all
38 38
39 39 $ hg churn
40 user1 3 ***************************************************************
40 41 user3 3 ***************************************************************
41 user1 3 ***************************************************************
42 42 user2 2 ******************************************
43 43
44 44 churn excluding one dir
45 45
46 46 $ hg churn -X e
47 47 user3 3 ***************************************************************
48 user1 2 ******************************************
48 49 user2 2 ******************************************
49 user1 2 ******************************************
50 50
51 51 churn up to rev 2
52 52
@@ -68,16 +68,16 b' churn with .hgchurn'
68 68 $ mv ../aliases .hgchurn
69 69 $ hg churn
70 70 skipping malformed alias: not-an-alias
71 alias1 3 **************************************************************
71 72 alias3 3 **************************************************************
72 alias1 3 **************************************************************
73 73 user2 2 *****************************************
74 74 $ rm .hgchurn
75 75
76 76 churn with column specifier
77 77
78 78 $ COLUMNS=40 hg churn
79 user1 3 ***********************
79 80 user3 3 ***********************
80 user1 3 ***********************
81 81 user2 2 ***************
82 82
83 83 churn by hour
@@ -155,8 +155,8 b' Ignore trailing or leading spaces in ema'
155 155 $ hg churn -c
156 156 user1 4 *********************************************************
157 157 user3 3 *******************************************
158 user2 2 *****************************
158 159 user4@x.com 2 *****************************
159 user2 2 *****************************
160 160 with space 1 **************
161 161
162 162 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now