Mercurial > public > mercurial-scm > hg
diff hgext/churn.py @ 40241:81e4f039a0cd
churn: use integer division consistently
This results in slight output changes, but it's at least consistent
between Python 2 and 3. Since the output is just bar graphs anyway,
I'm content with the changes.
Differential Revision: https://phab.mercurial-scm.org/D5063
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 13 Oct 2018 06:02:27 -0400 |
parents | 6f3e733848ae |
children | 12e2e5cd5777 |
line wrap: on
line diff
--- a/hgext/churn.py Sat Oct 13 05:58:16 2018 -0400 +++ b/hgext/churn.py Sat Oct 13 06:02:27 2018 -0400 @@ -8,7 +8,7 @@ '''command to display statistics about repository history''' -from __future__ import absolute_import +from __future__ import absolute_import, division import datetime import os @@ -205,7 +205,7 @@ '*' * charnum(sum(count))) def charnum(count): - return int(round(count * width / maxcount)) + return int(round(count * width // maxcount)) for name, count in rate: ui.write(format(name, count))