webcommands: use explicit integer division for Python 3 compat
Differential Revision: https://phab.mercurial-scm.org/D2532
--- a/mercurial/hgweb/webcommands.py Fri Mar 02 04:59:27 2018 +0530
+++ b/mercurial/hgweb/webcommands.py Thu Mar 01 18:39:21 2018 -0500
@@ -300,7 +300,7 @@
pass
lessvars = copy.copy(tmpl.defaults['sessionvars'])
- lessvars['revcount'] = max(revcount / 2, 1)
+ lessvars['revcount'] = max(revcount // 2, 1)
lessvars['rev'] = query
morevars = copy.copy(tmpl.defaults['sessionvars'])
morevars['revcount'] = revcount * 2
@@ -395,7 +395,7 @@
pass
lessvars = copy.copy(tmpl.defaults['sessionvars'])
- lessvars['revcount'] = max(revcount / 2, 1)
+ lessvars['revcount'] = max(revcount // 2, 1)
morevars = copy.copy(tmpl.defaults['sessionvars'])
morevars['revcount'] = revcount * 2
@@ -990,7 +990,7 @@
lrange = webutil.linerange(req)
lessvars = copy.copy(tmpl.defaults['sessionvars'])
- lessvars['revcount'] = max(revcount / 2, 1)
+ lessvars['revcount'] = max(revcount // 2, 1)
morevars = copy.copy(tmpl.defaults['sessionvars'])
morevars['revcount'] = revcount * 2
@@ -1208,7 +1208,7 @@
pass
lessvars = copy.copy(tmpl.defaults['sessionvars'])
- lessvars['revcount'] = max(revcount / 2, 1)
+ lessvars['revcount'] = max(revcount // 2, 1)
morevars = copy.copy(tmpl.defaults['sessionvars'])
morevars['revcount'] = revcount * 2