# HG changeset patch # User Augie Fackler # Date 1531323281 14400 # Node ID cd1c484e31e8c4bb6020370d39600c64ed09ec87 # Parent 0d27d6bcfb28922b289a4e0c5004e179c1895f07 revlog: adjust doctest examples to be portable to Python 3 The range() builtin returns a special object rather than a list, but we really wanted a list in these examples. Differential Revision: https://phab.mercurial-scm.org/D3922 diff -r 0d27d6bcfb28 -r cd1c484e31e8 mercurial/revlog.py --- a/mercurial/revlog.py Wed Jul 11 13:41:47 2018 -0400 +++ b/mercurial/revlog.py Wed Jul 11 11:34:41 2018 -0400 @@ -329,7 +329,7 @@ ... 91, #15 (5) ... ]) - >>> list(_slicechunk(revlog, range(16))) + >>> list(_slicechunk(revlog, list(range(16)))) [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]] >>> list(_slicechunk(revlog, [0, 15])) [[0], [15]] @@ -460,7 +460,7 @@ ... 91, #15 (5) ... ]) - >>> list(_slicechunktodensity(revlog, range(16))) + >>> list(_slicechunktodensity(revlog, list(range(16)))) [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]] >>> list(_slicechunktodensity(revlog, [0, 15])) [[0], [15]]