Mercurial > public > mercurial-scm > hg-stable
comparison tests/test-annotate.py @ 35986:cf887d601014
py3: use range instead of xrange
xrange is not available on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2074
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 07 Feb 2018 13:21:06 +0530 |
parents | 2f5a135b2b04 |
children | a36d3c8a0e41 |
comparison
equal
deleted
inserted
replaced
35985:1dbd8a62b581 | 35986:cf887d601014 |
---|---|
25 childdata = b'a\nb2\nc\nc2\nd\n' | 25 childdata = b'a\nb2\nc\nc2\nd\n' |
26 diffopts = mdiff.diffopts() | 26 diffopts = mdiff.diffopts() |
27 | 27 |
28 def decorate(text, rev): | 28 def decorate(text, rev): |
29 return ([annotateline(fctx=rev, lineno=i) | 29 return ([annotateline(fctx=rev, lineno=i) |
30 for i in xrange(1, text.count(b'\n') + 1)], | 30 for i in range(1, text.count(b'\n') + 1)], |
31 text) | 31 text) |
32 | 32 |
33 # Basic usage | 33 # Basic usage |
34 | 34 |
35 oldann = decorate(olddata, oldfctx) | 35 oldann = decorate(olddata, oldfctx) |