D2039: py3: slice on bytes to prevent getting the ascii values

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Mon Feb 5 09:27:01 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG558e01a23f40: py3: slice on bytes to prevent getting the ascii values (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2039?vs=5197&id=5210

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1196,7 +1196,7 @@
             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():



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


More information about the Mercurial-devel mailing list