Patchwork D3922: revlog: adjust doctest examples to be portable to Python 3

login
register
mail settings
Submitter phabricator
Date July 11, 2018, 6:12 p.m.
Message ID <3616eb8449ac26ce201a4d640413bdab@localhost.localdomain>
Download mbox | patch
Permalink /patch/32794/
State Not Applicable
Headers show

Comments

phabricator - July 11, 2018, 6:12 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcd1c484e31e8: revlog: adjust doctest examples to be portable to Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3922?vs=9540&id=9552

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -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]]