Patchwork D2337: py3: make sure we are doing integer division by using '//'

login
register
mail settings
Submitter phabricator
Date Feb. 18, 2018, 7:02 p.m.
Message ID <differential-rev-PHID-DREV-2ccvrjch2dfjfbmyeoly-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28121/
State Superseded
Headers show

Comments

phabricator - Feb. 18, 2018, 7:02 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2337

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -1335,7 +1335,7 @@ 
         # temporarily disable printing to windows by printstring
         patchdisplaystring = self.printitem(item, ignorefolding,
                                             recursechildren, towin=False)
-        numlines = len(patchdisplaystring) / self.xscreensize
+        numlines = len(patchdisplaystring) // self.xscreensize
         return numlines
 
     def sigwinchhandler(self, n, frame):