author | Matt Mackall <mpm@selenic.com> |
Tue, 31 May 2011 15:55:23 -0500 | |
changeset 14484 | 4582a4dd1817 |
parent 14483 | 973959fbe8ec |
child 14485 | 610873cf064a |
--- a/mercurial/scmutil.py Tue May 31 19:16:25 2011 +0200 +++ b/mercurial/scmutil.py Tue May 31 15:55:23 2011 -0500 @@ -698,6 +698,8 @@ requirements = set(opener.read("requires").splitlines()) for r in requirements: if r not in supported: + if not r or not r[0].isalnum(): + raise error.RequirementError(_(".hg/requires file is corrupt")) raise error.RequirementError(_("unknown repository format: " "requires feature '%s' (upgrade Mercurial)") % r) return requirements