[issue833] hg churn
Jesse Glick
mercurial-bugs at selenic.com
Mon Nov 19 12:28:20 CST 2007
New submission from Jesse Glick <jesse.glick at sun.com>:
There is a minor bug in hg churn affecting new (or almost) new repositories; a
division by zero is attempted in such cases. Easy to reproduce:
tmp$ mkdir hgtest-churn
tmp$ cd hgtest-churn
hgtest-churn$ hg init
hgtest-churn$ touch foo
hgtest-churn$ hg add
adding foo
hgtest-churn$ hg ci -m foo
hgtest-churn$ hg churn
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.5)
Traceback (most recent call last):
File "/home/jglick/bin/hg", line 14, in <module>
mercurial.dispatch.run()
File "/home/jglick/lib/python/mercurial/dispatch.py", line 20, in run
sys.exit(dispatch(sys.argv[1:]))
File "/home/jglick/lib/python/mercurial/dispatch.py", line 29, in dispatch
return _runcatch(u, args)
File "/home/jglick/lib/python/mercurial/dispatch.py", line 45, in _runcatch
return _dispatch(ui, args)
File "/home/jglick/lib/python/mercurial/dispatch.py", line 348, in _dispatch
ret = _runcommand(ui, options, cmd, d)
File "/home/jglick/lib/python/mercurial/dispatch.py", line 401, in _runcommand
return checkargs()
File "/home/jglick/lib/python/mercurial/dispatch.py", line 357, in checkargs
return cmdfunc()
File "/home/jglick/lib/python/mercurial/dispatch.py", line 340, in <lambda>
d = lambda: func(ui, repo, *args, **cmdoptions)
File "/home/jglick/lib/python/hgext/churn.py", line 191, in churn
graph(lines, maximum, width - 20 - 1 - 6 - 2 - 2, '*'))
File "/home/jglick/lib/python/hgext/churn.py", line 147, in graph
n = int(n * width / float(maximum))
ZeroDivisionError: float division
----------
messages: 4342
nosy: jglick
priority: bug
status: unread
title: hg churn
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue833>
____________________________________________________
More information about the Mercurial-devel
mailing list