D2074: py3: use range instead of xrange

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Wed Feb 7 09:01:35 UTC 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  xrange is not available on Python 3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2074

AFFECTED FILES
  tests/test-annotate.py

CHANGE DETAILS

diff --git a/tests/test-annotate.py b/tests/test-annotate.py
--- a/tests/test-annotate.py
+++ b/tests/test-annotate.py
@@ -27,7 +27,7 @@
 
         def decorate(text, rev):
             return ([annotateline(fctx=rev, lineno=i)
-                     for i in xrange(1, text.count(b'\n') + 1)],
+                     for i in range(1, text.count(b'\n') + 1)],
                     text)
 
         # Basic usage



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list