Patchwork D2074: py3: use range instead of xrange

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2018, 9:01 a.m.
Message ID <differential-rev-PHID-DREV-cou432426qna3lkrehmt-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27408/
State Superseded
Headers show

Comments

phabricator - Feb. 7, 2018, 9:01 a.m.
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




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

Patch

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