Mercurial > hg
changeset 14484:4582a4dd1817
requires: note apparent corruption
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 31 May 2011 15:55:23 -0500 |
parents | 973959fbe8ec |
children | 610873cf064a |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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