D3478: minirst: fix bytes slicing defect on Python 3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Tue May 8 09:34:47 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa61583cba509: minirst: fix bytes slicing defect on Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3478?vs=8505&id=8532

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

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/minirst.py

CHANGE DETAILS

diff --git a/mercurial/minirst.py b/mercurial/minirst.py
--- a/mercurial/minirst.py
+++ b/mercurial/minirst.py
@@ -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(' ')
 
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -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



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


More information about the Mercurial-devel mailing list