Mercurial > hg
comparison hgext/eol.py @ 38783:e7aa113b14f7
global: use pycompat.xrange()
On Python 3, our module importer automatically rewrites xrange()
to pycompat.xrange().
We want to move away from the custom importer on Python 3.
This commit converts all instances of xrange() to use
pycompat.xrange().
Differential Revision: https://phab.mercurial-scm.org/D4032
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 01 Aug 2018 13:00:45 -0700 |
parents | f47608575c10 |
children | d98ec36be808 |
comparison
equal
deleted
inserted
replaced
38782:7eba8f83129b | 38783:e7aa113b14f7 |
---|---|
264 def _checkhook(ui, repo, node, headsonly): | 264 def _checkhook(ui, repo, node, headsonly): |
265 # Get revisions to check and touched files at the same time | 265 # Get revisions to check and touched files at the same time |
266 ensureenabled(ui) | 266 ensureenabled(ui) |
267 files = set() | 267 files = set() |
268 revs = set() | 268 revs = set() |
269 for rev in xrange(repo[node].rev(), len(repo)): | 269 for rev in pycompat.xrange(repo[node].rev(), len(repo)): |
270 revs.add(rev) | 270 revs.add(rev) |
271 if headsonly: | 271 if headsonly: |
272 ctx = repo[rev] | 272 ctx = repo[rev] |
273 files.update(ctx.files()) | 273 files.update(ctx.files()) |
274 for pctx in ctx.parents(): | 274 for pctx in ctx.parents(): |