diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py --- a/mercurial/pycompat.py +++ b/mercurial/pycompat.py @@ -29,9 +29,7 @@ else: import urllib.parse as urlparse import xmlrpc.client as xmlrpclib -try: - xrange -except NameError: +if sys.version_info[0] >= 3: import builtins builtins.xrange = range