changeset 18369 | 2150e70c0ee1 |
parent 17773 | 434e5bd615fc |
child 19464 | 68f7129af6a8 |
--- a/hgext/churn.py Wed Dec 12 02:38:14 2012 +0100 +++ b/hgext/churn.py Wed Dec 12 02:38:14 2012 +0100 @@ -144,8 +144,10 @@ if not rate: return - sortkey = ((not opts.get('sort')) and (lambda x: -sum(x[1])) or None) - rate.sort(key=sortkey) + if opts.get('sort'): + rate.sort() + else: + rate.sort(key=lambda x: (-sum(x[1]), x)) # Be careful not to have a zero maxcount (issue833) maxcount = float(max(sum(v) for k, v in rate)) or 1.0