# HG changeset patch # User Augie Fackler <au...@google.com> # Date 1489899928 14400 # Sun Mar 19 01:05:28 2017 -0400 # Node ID b9ee2497bba6e49fb08e0119cef0f27baccb61f8 # Parent 9c25b4e6ab7bf364a101d8a0bc7c8a196131add8 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/ 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) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel