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

login
register
mail settings
Submitter phabricator
Date Feb. 19, 2018, 2:06 a.m.
Message ID <c1fc1d820c08a71efe24379b0cc0eca3@localhost.localdomain>
Download mbox | patch
Permalink /patch/28140/
State Not Applicable
Headers show

Comments

phabricator - Feb. 19, 2018, 2:06 a.m.
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




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

Patch

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