Mercurial > hg > mercurial-source
changeset 9389:7cca980317c5
merge with crew-stable
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 26 Aug 2009 13:05:51 +0200 |
parents | 20ed9909dbd9 (current diff) f7968bba2307 (diff) |
children | 637f2726ec7f |
files | hgext/churn.py tests/test-churn |
diffstat | 3 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/churn.py +++ b/hgext/churn.py @@ -148,7 +148,8 @@ sortkey = ((not opts.get('sort')) and (lambda x: -x[1]) or None) rate.sort(key=sortkey) - maxcount = float(max([v for k, v in rate])) + # Be careful not to have a zero maxcount (issue833) + maxcount = float(max([v for k, v in rate])) or 1.0 maxname = max([len(k) for k, v in rate]) ttywidth = util.termwidth()