D2341: scmutil: fix requires-file isalnum() check on first byte

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sun Feb 18 21:06:41 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcd15577f5bee: scmutil: fix requires-file isalnum() check on first byte (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2341?vs=5898&id=5909

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

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



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


More information about the Mercurial-devel mailing list