##// END OF EJS Templates
merge with crew-stable
Dirkjan Ochtman -
r9389:7cca9803 merge default
parent child Browse files
Show More
@@ -148,7 +148,8 b' def churn(ui, repo, *pats, **opts):'
148 sortkey = ((not opts.get('sort')) and (lambda x: -x[1]) or None)
148 sortkey = ((not opts.get('sort')) and (lambda x: -x[1]) or None)
149 rate.sort(key=sortkey)
149 rate.sort(key=sortkey)
150
150
151 maxcount = float(max([v for k, v in rate]))
151 # Be careful not to have a zero maxcount (issue833)
152 maxcount = float(max([v for k, v in rate])) or 1.0
152 maxname = max([len(k) for k, v in rate])
153 maxname = max([len(k) for k, v in rate])
153
154
154 ttywidth = util.termwidth()
155 ttywidth = util.termwidth()
@@ -50,3 +50,13 b' COLUMNS=40 hg churn'
50 echo % churn by hour
50 echo % churn by hour
51 hg churn -f '%H' -s
51 hg churn -f '%H' -s
52
52
53 cd ..
54
55 # issue 833: ZeroDivisionError
56 hg init issue-833
57 cd issue-833
58 touch foo
59 hg ci -Am foo
60 # this was failing with a ZeroDivisionError
61 hg churn
62 cd ..
@@ -28,3 +28,5 b' 06 1 ****************'
28 09 2 *********************************
28 09 2 *********************************
29 12 4 ******************************************************************
29 12 4 ******************************************************************
30 13 1 ****************
30 13 1 ****************
31 adding foo
32 test 0
General Comments 0
You need to be logged in to leave comments. Login now