changeset 36553:24897a9d18ac

webcommands: use explicit integer division for Python 3 compat Differential Revision: https://phab.mercurial-scm.org/D2532
author Augie Fackler <augie@google.com>
date Thu, 01 Mar 2018 18:39:21 -0500
parents a185b1af207c
children 06f59bdde626
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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