[PATCH] pure: use int instead of long

Martin von Zweigbergk martinvonz at google.com
Tue Mar 21 00:58:20 EDT 2017


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1490071228 25200
#      Mon Mar 20 21:40:28 2017 -0700
# Node ID 8360d7a65480d45606ee61ca737beefd2087b731
# Parent  f42ec07db6a995d972fee8ce2a7fb122c5372109
pure: use int instead of long

Similar to the recent 73aa13bc8dac (revlog: use int instead of long,
2017-03-19).

diff -r f42ec07db6a9 -r 8360d7a65480 mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py	Mon Mar 20 22:06:57 2017 -0400
+++ b/mercurial/pure/parsers.py	Mon Mar 20 21:40:28 2017 -0700
@@ -14,8 +14,6 @@
 from . import pycompat
 stringio = pycompat.stringio
 
-if pycompat.ispy3:
-    long = int
 
 _pack = struct.pack
 _unpack = struct.unpack
@@ -37,7 +35,7 @@
     return int(q & 0xFFFF)
 
 def offset_type(offset, type):
-    return long(long(offset) << 16 | type)
+    return int(int(offset) << 16 | type)
 
 class BaseIndexObject(object):
     def __len__(self):


More information about the Mercurial-devel mailing list