diff mercurial/revset.py @ 49640:76c128d4de4e stable

revset: the `random` sort should not depend on sys.maxsize (issue6770)
author Julien Cristau <jcristau@mozilla.com>
date Tue, 06 Dec 2022 15:11:51 +0100
parents 117dcc4a0e67
children 1bd33932713d
line wrap: on
line diff
--- a/mercurial/revset.py	Mon Jan 23 14:04:17 2023 +0100
+++ b/mercurial/revset.py	Tue Dec 06 15:11:51 2022 +0100
@@ -10,7 +10,6 @@
 import functools
 import random
 import re
-import sys
 
 from .i18n import _
 from .pycompat import getattr
@@ -2355,7 +2354,7 @@
     return subset & s.filter(filter, condrepr=b'<roots>')
 
 
-MAXINT = sys.maxsize
+MAXINT = (1 << 31) - 1
 MININT = -MAXINT - 1