changeset 31504:73aa13bc8dac

revlog: use int instead of long By my reading of PEP 237[0], this is completely safe and has been since Python 2.2. 0: https://www.python.org/dev/peps/pep-0237/
author Augie Fackler <augie@google.com>
date Sun, 19 Mar 2017 01:05:28 -0400
parents 0ca00905f769
children d96d010be4fa
files mercurial/revlog.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Sun Mar 19 01:02:42 2017 -0400
+++ b/mercurial/revlog.py	Sun Mar 19 01:05:28 2017 -0400
@@ -117,7 +117,7 @@
 def offset_type(offset, type):
     if (type & ~REVIDX_KNOWN_FLAGS) != 0:
         raise ValueError('unknown revlog index flags')
-    return long(long(offset) << 16 | type)
+    return int(int(offset) << 16 | type)
 
 _nullhash = hashlib.sha1(nullid)