changeset 36346:3f98634b6572

scmutil: fix requires-file isalnum() check on first byte Slice instead of subscript to get a bytes from a bytes. # skip-blame just a py3 slice-instead-of-subscript change Differential Revision: https://phab.mercurial-scm.org/D2341
author Augie Fackler <augie@google.com>
date Sun, 18 Feb 2018 14:37:36 -0500
parents 3ac8b5c1c36c
children be9c497e0bfd
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Sun Feb 18 14:29:04 2018 -0500
+++ b/mercurial/scmutil.py	Sun Feb 18 14:37:36 2018 -0500
@@ -887,7 +887,7 @@
     missings = []
     for r in requirements:
         if r not in supported:
-            if not r or not r[0].isalnum():
+            if not r or not r[0:1].isalnum():
                 raise error.RequirementError(_(".hg/requires file is corrupt"))
             missings.append(r)
     missings.sort()