From e0f1b901d85cec3bd18549a365f6f692bbdabff7 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Sun, 19 Mar 2017 01:05:28 -0400 Subject: [PATCH] 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/ --- mercurial/revlog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mercurial/revlog.py b/mercurial/revlog.py index fa3b7bf606..d44e10fe3a 100644 --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -117,7 +117,7 @@ def gettype(q): 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)