# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-05 07:28:51 # Node ID 558e01a23f400c78fef7dc3f7216cbfcaebbacd3 # Parent 78b985c75731ba2bdf0a8d99497b14fbb222f080 py3: slice on bytes to prevent getting the ascii values Differential Revision: https://phab.mercurial-scm.org/D2039 diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1196,7 +1196,7 @@ class simplekeyvaluefile(object): if k == self.firstlinekey: e = "key name '%s' is reserved" % self.firstlinekey raise error.ProgrammingError(e) - if not k[0].isalpha(): + if not k[0:1].isalpha(): e = "keys must start with a letter in a key-value file" raise error.ProgrammingError(e) if not k.isalnum():