diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- 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)