Patchwork D7019: tests: use range() in generate-churning-module.py

login
register
mail settings
Submitter phabricator
Date Oct. 8, 2019, 6:20 p.m.
Message ID <dc1813b915b922197593f29339b29bf3@localhost.localdomain>
Download mbox | patch
Permalink /patch/42115/
State Not Applicable
Headers show

Comments

phabricator - Oct. 8, 2019, 6:20 p.m.
Closed by commit rHG1fcf79e9943a: tests: use range() in generate-churning-module.py (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7019?vs=16942&id=16970

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7019/new/

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

AFFECTED FILES
  tests/artifacts/scripts/generate-churning-bundle.py

CHANGE DETAILS




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

Patch

diff --git a/tests/artifacts/scripts/generate-churning-bundle.py b/tests/artifacts/scripts/generate-churning-bundle.py
--- a/tests/artifacts/scripts/generate-churning-bundle.py
+++ b/tests/artifacts/scripts/generate-churning-bundle.py
@@ -62,7 +62,7 @@ 
     else:
         current = str(iteridx)
 
-    for idx in xrange(NB_LINES):
+    for idx in range(NB_LINES):
         do_change_line = True
         if oldcontent is not None and ALWAYS_CHANGE_LINES < idx:
             do_change_line = not ((idx - iteridx) % OTHER_CHANGES)
@@ -113,7 +113,7 @@ 
         hg('init')
         updatefile(FILENAME, None)
         hg('commit', '--addremove', '--message', 'initial commit')
-        for idx in xrange(1, NB_CHANGESET + 1):
+        for idx in range(1, NB_CHANGESET + 1):
             if sys.stdout.isatty():
                 print("generating commit #%d/%d" % (idx, NB_CHANGESET))
             if (idx % PERIOD_BRANCHING) == 0: