changeset 37883:a61583cba509

minirst: fix bytes slicing defect on Python 3 This is the only lingering problem in minirst on Python 3. test-minirst.py now passes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3478
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 00:50:08 -0400
parents 3d24f708f7b6
children 72284d296b02
files contrib/python3-whitelist mercurial/minirst.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Fri Apr 27 00:46:05 2018 -0400
+++ b/contrib/python3-whitelist	Fri Apr 27 00:50:08 2018 -0400
@@ -258,6 +258,7 @@
 test-merge8.t
 test-merge9.t
 test-minifileset.py
+test-minirst.py
 test-mq-git.t
 test-mq-header-date.t
 test-mq-header-from.t
--- a/mercurial/minirst.py	Fri Apr 27 00:46:05 2018 -0400
+++ b/mercurial/minirst.py	Fri Apr 27 00:50:08 2018 -0400
@@ -169,7 +169,7 @@
         if not itemre.match(line1):
             return False
         if singleline:
-            return line2 == '' or line2[0] == ' ' or itemre.match(line2)
+            return line2 == '' or line2[0:1] == ' ' or itemre.match(line2)
         else:
             return line2.startswith(' ')