--- a/mercurial/pycompat.py Fri Apr 08 14:03:05 2016 +0000 +++ b/mercurial/pycompat.py Wed Apr 06 22:35:52 2016 +0000 @@ -17,3 +17,9 @@ import queue as _queue empty = _queue.Empty queue = _queue.Queue + +try: + xrange +except NameError: + import builtins + builtins.xrange = range