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
--- 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()