changeset 38655:cd1c484e31e8

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
author Augie Fackler <augie@google.com>
date Wed, 11 Jul 2018 11:34:41 -0400
parents 0d27d6bcfb28
children 531f5e933e49
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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]]